diff options
author | Ivan Chen <ivan@thetaggid.com> | 2021-02-11 12:23:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 12:23:03 -0500 |
commit | d768712304ccdb016f8bef2a122fd25c01710a67 (patch) | |
tree | bad1bc9b04b91d4ae983343dad9971ab73d3071a /src/components/common/SocialLinkModal.tsx | |
parent | 0e9456692e9d0d0d0e8da483549b386c9af8df55 (diff) | |
parent | 952eb1b9b58362cc4ead737554872197ae8a89b1 (diff) |
Merge pull request #232 from IvanIFChen/tma639-new-version-available
[TMA-639] New Version Available
Diffstat (limited to 'src/components/common/SocialLinkModal.tsx')
-rw-r--r-- | src/components/common/SocialLinkModal.tsx | 80 |
1 files changed, 36 insertions, 44 deletions
diff --git a/src/components/common/SocialLinkModal.tsx b/src/components/common/SocialLinkModal.tsx index d3bc3945..67a3f074 100644 --- a/src/components/common/SocialLinkModal.tsx +++ b/src/components/common/SocialLinkModal.tsx @@ -4,6 +4,7 @@ import {TextInput} from 'react-native-gesture-handler'; import {SocialIcon} from '.'; import CloseIcon from '../../assets/ionicons/close-outline.svg'; import {normalize, SCREEN_WIDTH} from '../../utils'; +import CenteredView from './CenteredView'; import TaggSquareButton from './TaggSquareButton'; interface SocialLinkModalProps { @@ -34,55 +35,46 @@ const SocialLinkModal: React.FC<SocialLinkModalProps> = ({ }; return ( - <> - <View style={styles.centeredView}> - <Modal - animationType="slide" - transparent={true} - visible={modalVisible} - onRequestClose={() => {}}> - <View style={styles.centeredView}> - <View style={styles.modalView}> - <TouchableOpacity - style={styles.closeButton} - onPress={onClosePress}> - <CloseIcon height={'100%'} width={'100%'} color={'grey'} /> - </TouchableOpacity> - <SocialIcon style={styles.icon} social={social} /> - <Text style={styles.titleLabel}>{social}</Text> - <Text style={styles.descriptionLabel}> - Insert your {social.toLowerCase()} username to link your{' '} - {social.toLowerCase()} account to your profile! - </Text> - <TextInput - autoCapitalize={'none'} - autoCorrect={false} - placeholder={'Username'} - style={styles.textInput} - onChangeText={setUsername} - selectionColor={'grey'} - value={username} - /> - <TaggSquareButton - title={'Submit'} - onPress={onSubmit} - mode={'gradient'} - color={'white'} - /> - </View> + <CenteredView> + <Modal + animationType="slide" + transparent={true} + visible={modalVisible} + onRequestClose={() => {}}> + <CenteredView> + <View style={styles.modalView}> + <TouchableOpacity style={styles.closeButton} onPress={onClosePress}> + <CloseIcon height={'100%'} width={'100%'} color={'grey'} /> + </TouchableOpacity> + <SocialIcon style={styles.icon} social={social} /> + <Text style={styles.titleLabel}>{social}</Text> + <Text style={styles.descriptionLabel}> + Insert your {social.toLowerCase()} username to link your{' '} + {social.toLowerCase()} account to your profile! + </Text> + <TextInput + autoCapitalize={'none'} + autoCorrect={false} + placeholder={'Username'} + style={styles.textInput} + onChangeText={setUsername} + selectionColor={'grey'} + value={username} + /> + <TaggSquareButton + title={'Submit'} + onPress={onSubmit} + mode={'gradient'} + color={'white'} + /> </View> - </Modal> - </View> - </> + </CenteredView> + </Modal> + </CenteredView> ); }; const styles = StyleSheet.create({ - centeredView: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - }, modalView: { width: SCREEN_WIDTH * 0.8, backgroundColor: 'white', |