Created
September 7, 2016 07:35
-
-
Save yogieputra8/617b41b32ec4f499d511d6002595368e to your computer and use it in GitHub Desktop.
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, { Component } from 'react'; | |
import { | |
View, | |
Text, | |
TextInput, | |
TouchableOpacity, | |
StyleSheet | |
} from 'react-native'; | |
import styles from '../../styles'; | |
module.exports = React.createClass({ | |
getInitialState(){ | |
return({ | |
email: '', | |
password: '' | |
}) | |
}, | |
render(){ | |
return( | |
<View style={styles.container}> | |
<TextInput | |
placeholder='Email' | |
style={styles.input} | |
onChangeText={(text) => this.setState({email: text})} | |
/> | |
<TextInput | |
placeholder='Password' | |
style={styles.input} | |
onChangeText={(text) => this.setState({password: text})} | |
/> | |
<TouchableOpacity style={styles.buttonContainer}> | |
<Text style={styles.button}>Sign In</Text> | |
</TouchableOpacity> | |
<View style={styles.links}> | |
<TouchableOpacity> | |
<Text style={styles.link}>Forgot Password?</Text> | |
</TouchableOpacity> | |
<TouchableOpacity | |
onPress={() => { | |
this.props.navigator.push({name: 'signUp'}) | |
}}> | |
<Text style={styles.link}>Sign Up</Text> | |
</TouchableOpacity> | |
</View> | |
</View> | |
) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment