Last active
January 4, 2024 13:06
-
-
Save justinecodez/42952552203877b9ff923abd92666859 to your computer and use it in GitHub Desktop.
Revisions
-
justinecodez revised this gist
Jan 4, 2024 . No changes.There are no files selected for viewing
-
justinecodez renamed this gist
Jan 4, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
justinecodez created this gist
Jan 4, 2024 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ import React from 'react' import { ActivityIndicator, } from 'react-native' const CustomButton = ({ }) => { const [loading, setIsLoading] = useState(false) loading ? return ( <View style={styles.loadingOverlay}> <ActivityIndicator size="large" color={colors.white} /> </View> </TouchableOpacity> ): return (<View><Text>Finished laoding </Text></View>) } const styles = StyleSheet.create<Styles>({ loadingOverlay: { ...StyleSheet.absoluteFillObject, backgroundColor: 'rgba(0, 0, 0, 0.5)', // Semi-transparent overlay justifyContent: 'center', alignItems: 'center', borderRadius: 8, // Match your button's borderRadius }, }) export default CustomButton