Skip to content

Instantly share code, notes, and snippets.

@yogieputra8
Created September 7, 2016 07:35
Show Gist options
  • Save yogieputra8/617b41b32ec4f499d511d6002595368e to your computer and use it in GitHub Desktop.
Save yogieputra8/617b41b32ec4f499d511d6002595368e to your computer and use it in GitHub Desktop.
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