-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
79 lines (75 loc) · 1.8 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, {Component} from 'react';
import {Image, StyleSheet, Text, TextInput, View} from 'react-native';
type Props = {};
export default class App extends Component<Props> {
constructor(props) {
super(props);
this.state = {email: '', password: ''};
}
render() {
return (
<View style={styles.container}>
<Text style={styles.text}>Email</Text>
<TextInput
value={this.state.value}
style={styles.textInput}
placeholder="Email"
onChangeText={(email) => this.setState({email})}
textContentType='username'
keyboardType='email-address'
autoCapitalize='none'
/>
<Text style={styles.text}>Password</Text>
<TextInput
value={this.state.value}
style={styles.textInput}
placeholder="Password"
onChangeText={(password) => this.setState({password})}
textContentType='password'
secureTextEntry={true}
autoCapitalize='none'
/>
<View style={styles.logoContainer}>
<Image style={styles.logo} source={require('./background.png')}/>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
// justifyContent: 'center',
// alignItems: 'flex-start',
flex: 1,
backgroundColor: '#ffea00',
paddingHorizontal: 20,
paddingTop: 50
},
logoContainer: {
flex: 1,
alignItems: 'center',
paddingTop: 40
},
logo: {
width: 240,
height: 240,
},
textInput: {
height: 36,
borderColor: '#00000033',
borderRadius: 8,
borderWidth: 1,
backgroundColor: '#fff',
paddingHorizontal: 8
},
text: {
paddingVertical: 8
}
});