diff options
author | Ivan Chen <ivan@tagg.id> | 2021-01-18 18:29:13 -0500 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-01-18 18:29:13 -0500 |
commit | d981c6d8f420e0344a70209bc3cb2de929b41842 (patch) | |
tree | 4a33b444b49ff88cbc50a265689249e8065d714f /src | |
parent | bb885ff561e44e23f9fb27ba8aa18f4dce8c690e (diff) |
loading indicator done
Diffstat (limited to 'src')
-rw-r--r-- | src/assets/gifs/loading-animation.gif | bin | 0 -> 285396 bytes | |||
-rw-r--r-- | src/components/common/TaggLoadingIndicator.tsx | 13 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/assets/gifs/loading-animation.gif b/src/assets/gifs/loading-animation.gif Binary files differnew file mode 100644 index 00000000..6a69b07b --- /dev/null +++ b/src/assets/gifs/loading-animation.gif diff --git a/src/components/common/TaggLoadingIndicator.tsx b/src/components/common/TaggLoadingIndicator.tsx index cfb99e80..c3c44bf9 100644 --- a/src/components/common/TaggLoadingIndicator.tsx +++ b/src/components/common/TaggLoadingIndicator.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import {ActivityIndicator, StyleSheet, View} from 'react-native'; +import {Image, StyleSheet, View} from 'react-native'; type TaggLoadingIndicatorProps = { color: string; @@ -7,7 +7,10 @@ type TaggLoadingIndicatorProps = { const TaggLoadingIndicator: React.FC<TaggLoadingIndicatorProps> = ({color}) => { return ( <View style={[styles.container, styles.horizontal]}> - <ActivityIndicator size="large" color={color} /> + <Image + source={require('../../assets/gifs/loading-animation.gif')} + style={styles.icon} + /> </View> ); }; @@ -22,6 +25,12 @@ const styles = StyleSheet.create({ justifyContent: 'space-around', padding: 10, }, + icon: { + alignSelf: 'center', + justifyContent: 'center', + width: '30%', + height: '5%', + }, }); export default TaggLoadingIndicator; |