Last active
August 8, 2021 17:41
-
-
Save Pinwheeler/3a4a56c82e54860d96117854defb5855 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import { View, Text } from "react-native" | |
import { ActivityIndicator } from "react-native-paper" | |
import Theme from "src/lib/Theme" | |
interface Props { | |
loading: boolean | |
} | |
export const LoadingScreen: React.FC<Props> = (props) => { | |
return ( | |
<> | |
{props.children} | |
{props.loading && ( | |
<View | |
style={{ | |
flexDirection: "column", | |
alignItems: "center", | |
justifyContent: "center", | |
height: "100%", | |
backgroundColor: Theme.colors.background, | |
}} | |
> | |
<Text>Loading...</Text> | |
<View style={{ height: 20 }} /> | |
<ActivityIndicator /> | |
</View> | |
)} | |
</> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment