Created
May 16, 2018 15:53
-
-
Save hinata4zzahra/c174527622a1938084cf2b461bf591d2 to your computer and use it in GitHub Desktop.
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
import React, {Component} from 'react'; | |
import { | |
StyleSheet, TouchableOpacity, | |
View, Text, Image, ImageBackground, | |
} from 'react-native'; | |
import { | |
Form, Item, Input, Label, | |
Icon, Button | |
} from 'native-base'; | |
import bgSrc from '../img/bgpic5.gif'; | |
import logoImg from '../img/logo.png'; | |
import LoginForm from '../components/LoginForm' | |
export default class LoginScreen extends Component { | |
handleSubmit = () => { | |
alert('this is login !') | |
} | |
render() { | |
return( | |
<ImageBackground style={styles.picture} source={bgSrc}> | |
<View style={styles.container}> | |
<View style={styles.conImg}> | |
<Image source={logoImg} style={styles.image} /> | |
</View> | |
<View style={styles.form}> | |
<LoginForm {...this.props} onSubmit={this.handleSubmit} /> | |
</View> | |
<View style={styles.sign}> | |
<TouchableOpacity> | |
<Text style={styles.text1}>Create Account</Text> | |
</TouchableOpacity> | |
<TouchableOpacity> | |
<Text style={styles.text1}>ForgotEmail?</Text> | |
</TouchableOpacity> | |
</View> | |
</View> | |
</ImageBackground> | |
) | |
} | |
} | |
const styles = StyleSheet.create({ | |
picture: { | |
flex: 1, | |
width: null, | |
height: null, | |
}, | |
container: { | |
flex: 1, | |
}, | |
sign: { | |
flex: 1, | |
flexDirection: 'row', | |
justifyContent: 'space-around', | |
alignItems:'center' | |
}, | |
form: { | |
flex: 1, | |
justifyContent: 'center', | |
marginRight:70, | |
marginLeft:60 | |
}, | |
conImg: { | |
flex: 2, | |
alignItems: 'center', | |
justifyContent: 'center', | |
}, | |
image: { | |
width: 125, | |
height: 125, | |
}, | |
text1: { | |
color: "#f9fafc", | |
backgroundColor: 'transparent', | |
alignItems:'center', | |
fontFamily:'Gabriola Regular' | |
}, | |
conbutton:{ | |
flex:0.5, | |
justifyContent:'center', | |
alignItems:'center', | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment