Last active
January 13, 2019 16:32
-
-
Save youneshenniwrites/a05ec66f2a700da9eb99be8ff9580ca0 to your computer and use it in GitHub Desktop.
Sign up screen layout for RNAuthAWS
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 characters
export default class SignUpScreen extends React.Component { | |
// ... same code above this line | |
render() { | |
return ( | |
<SafeAreaView style={styles.container}> | |
<StatusBar/> | |
<KeyboardAvoidingView | |
style={styles.container} | |
behavior='padding' | |
enabled> | |
<TouchableWithoutFeedback style={styles.container} onPress={Keyboard.dismiss}> | |
<View style={styles.container}> | |
<Container style={styles.infoContainer}> | |
<View style={styles.container}> | |
{/* username section */} | |
<Item rounded style={styles.itemStyle}> | |
<Icon | |
active | |
name='person' | |
style={styles.iconStyle} | |
/> | |
<Input | |
style={styles.input} | |
placeholder='Username' | |
placeholderTextColor='#adb4bc' | |
keyboardType={'email-address'} | |
returnKeyType='next' | |
autoCapitalize='none' | |
autoCorrect={false} | |
onSubmitEditing={(event) => {this.refs.SecondInput._root.focus()}} | |
onChangeText={value => this.onChangeText('username', value)} | |
/> | |
</Item> | |
{/* password section */} | |
<Item rounded style={styles.itemStyle}> | |
<Icon | |
active | |
name='lock' | |
style={styles.iconStyle} | |
/> | |
<Input | |
style={styles.input} | |
placeholder='Password' | |
placeholderTextColor='#adb4bc' | |
returnKeyType='next' | |
autoCapitalize='none' | |
autoCorrect={false} | |
secureTextEntry={true} | |
// ref={c => this.SecondInput = c} | |
ref='SecondInput' | |
onSubmitEditing={(event) => {this.refs.ThirdInput._root.focus()}} | |
onChangeText={value => this.onChangeText('password', value)} | |
/> | |
</Item> | |
{/* email section */} | |
<Item rounded style={styles.itemStyle}> | |
<Icon | |
active | |
name='mail' | |
style={styles.iconStyle} | |
/> | |
<Input | |
style={styles.input} | |
placeholder='Email' | |
placeholderTextColor='#adb4bc' | |
keyboardType={'email-address'} | |
returnKeyType='next' | |
autoCapitalize='none' | |
autoCorrect={false} | |
secureTextEntry={false} | |
ref='ThirdInput' | |
onSubmitEditing={(event) => {this.refs.FourthInput._root.focus()}} | |
onChangeText={value => this.onChangeText('email', value)} | |
/> | |
</Item> | |
{/* phone section */} | |
<Item rounded style={styles.itemStyle}> | |
<Icon | |
active | |
name='call' | |
style={styles.iconStyle} | |
/> | |
<Input | |
style={styles.input} | |
placeholder='+44766554433' | |
placeholderTextColor='#adb4bc' | |
keyboardType={'phone-pad'} | |
returnKeyType='done' | |
autoCapitalize='none' | |
autoCorrect={false} | |
secureTextEntry={false} | |
ref='FourthInput' | |
value={this.state.phoneNumber} | |
onChangeText={(val) => this.onChangeText('phoneNumber', val)} | |
/> | |
</Item> | |
{/* End of phone input */} | |
<TouchableOpacity | |
style={styles.buttonStyle}> | |
<Text style={styles.buttonText}> | |
Sign Up | |
</Text> | |
</TouchableOpacity> | |
{/* code confirmation section */} | |
<Item rounded style={styles.itemStyle}> | |
<Icon | |
active | |
name='md-apps' | |
style={styles.iconStyle} | |
/> | |
<Input | |
style={styles.input} | |
placeholder='Confirmation code' | |
placeholderTextColor='#adb4bc' | |
keyboardType={'numeric'} | |
returnKeyType='done' | |
autoCapitalize='none' | |
autoCorrect={false} | |
secureTextEntry={false} | |
onChangeText={value => this.onChangeText('authCode', value)} | |
/> | |
</Item> | |
<TouchableOpacity | |
style={styles.buttonStyle}> | |
<Text style={styles.buttonText}> | |
Confirm Sign Up | |
</Text> | |
</TouchableOpacity> | |
<TouchableOpacity | |
style={styles.buttonStyle}> | |
<Text style={styles.buttonText}> | |
Resend code | |
</Text> | |
</TouchableOpacity> | |
</View> | |
</Container> | |
</View> | |
</TouchableWithoutFeedback> | |
</KeyboardAvoidingView> | |
</SafeAreaView> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment