Created
January 8, 2019 12:44
-
-
Save youneshenniwrites/7d66081487c32312e160404cfd8277f3 to your computer and use it in GitHub Desktop.
First design for the welcome screen of the 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
import React from 'react' | |
import { | |
StyleSheet, | |
View, | |
Text, | |
TouchableOpacity, | |
} from 'react-native' | |
export default class WelcomeScreen extends React.Component { | |
handleRoute = async (destination) => { | |
await this.props.navigation.navigate(destination) | |
} | |
render() { | |
return ( | |
<View style={styles.container}> | |
<TouchableOpacity | |
onPress={() => this.props.navigation.navigate('SignUp')} | |
style={styles.buttonStyle}> | |
<Text style={styles.textStyle}>Sign up</Text> | |
</TouchableOpacity> | |
<TouchableOpacity | |
onPress={() => this.props.navigation.navigate('SignIn')} | |
style={styles.buttonStyle}> | |
<Text style={styles.textStyle}>Sign in</Text> | |
</TouchableOpacity> | |
<TouchableOpacity | |
onPress={() => this.props.navigation.navigate('ForgetPassword')} | |
style={styles.buttonStyle}> | |
<Text style={styles.textStyle}>Forget password ?</Text> | |
</TouchableOpacity> | |
</View> | |
) | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
backgroundColor: '#aa73b7', | |
alignItems: 'center', | |
justifyContent: 'center', | |
}, | |
buttonStyle: { | |
padding: 20, | |
}, | |
textStyle: { | |
fontSize: 18, | |
padding: 10 | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment