Skip to content

Instantly share code, notes, and snippets.

@youneshenniwrites
Created January 8, 2019 12:44
Show Gist options
  • Save youneshenniwrites/7d66081487c32312e160404cfd8277f3 to your computer and use it in GitHub Desktop.
Save youneshenniwrites/7d66081487c32312e160404cfd8277f3 to your computer and use it in GitHub Desktop.
First design for the welcome screen of the RNAuthAWS
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