-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
65 lines (62 loc) · 1.31 KB
/
index.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
import React, { Component } from 'react'
import {name as appName} from './app.json';
import {
AppRegistry,
StyleSheet,
TouchableHighlight,
TextInput,
Text,
View,
} from 'react-native'
class App extends Component {
constructor(props) {
super(props)
}
onLogin = () => {
// ...
}
render = () => {
return (
<View>
<View style={styles.field}>
<Text style={styles.field_name}>UserName : </Text>
<TextInput textContentType="username" style={styles.field_box}/>
</View>
<View style={styles.field}>
<Text style={styles.field_name}>PassWord : </Text>
<TextInput textContentType="password" style={styles.field_box}/>
</View>
<TouchableHighlight onPress={this.onLogin}>
<Text style={styles.button}>LOGIN</Text>
</TouchableHighlight>
</View>
)
}
}
const styles = StyleSheet.create({
button: {
backgroundColor: 'green',
width: '80%',
textAlign: 'center',
borderRadius: 50,
marginTop: 25,
padding: 15,
marginLeft: '10%',
marginRight: '10%',
fontSize: 30,
},
field: {
backgroundColor: '#e1e1e1',
width: '100%',
marginTop: 20,
padding: 5,
},
field_name: {
alignItems: 'center',
padding: 5
},
field_box: {
color: 'black'
}
})
AppRegistry.registerComponent(appName, () => App);