Skip to content

Instantly share code, notes, and snippets.

@m4har
Created May 15, 2019 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m4har/3909e8b624d300a6294cf772d09f27ce to your computer and use it in GitHub Desktop.
Save m4har/3909e8b624d300a6294cf772d09f27ce to your computer and use it in GitHub Desktop.
component Loading Indicator
// src/components/Loading/index.js
import React from "react";
import { ActivityIndicator, Platform } from "react-native";
import Modal from "../Modal";
const Loading = ({ onDismiss, visible, onRequestClose }) => (
<Modal
visible={visible}
onRequestClose={onRequestClose}
onDismiss={onDismiss}
>
<ActivityIndicator color="#fff" size={Platform.OS === "ios" ? 1 : 100} />
</Modal>
);
export default Loading;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment