Last active
January 13, 2019 12:12
-
-
Save youneshenniwrites/21abd8c7f2578439bbdf08edbbe61de2 to your computer and use it in GitHub Desktop.
Sign in screen layout for RNAuthAWS
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
export default class SignInScreen extends React.Component { | |
//... same code as before in the above | |
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}> | |
<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> | |
<Item rounded style={styles.itemStyle}> | |
<Icon | |
active | |
name='lock' | |
style={styles.iconStyle} | |
/> | |
<Input | |
style={styles.input} | |
placeholder='Password' | |
placeholderTextColor='#adb4bc' | |
returnKeyType='go' | |
autoCapitalize='none' | |
autoCorrect={false} | |
secureTextEntry={true} | |
ref='SecondInput' | |
onChangeText={value => this.onChangeText('password', value)} | |
/> | |
</Item> | |
<TouchableOpacity | |
onPress={() => this.signIn()} | |
style={styles.buttonStyle}> | |
<Text style={styles.buttonText}> | |
Sign In | |
</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