Login.js
2.89 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import React, { Component } from 'react';
import { StyleSheet, Text, View, TextInput, Image, } from 'react-native';
import LoginButton from './component/LoginButton';
export default class Login extends Component {
constructor(props) {
super(props);
this.state = {
ID: '',
};
}
static navigationOptions = {
title: 'Login',
};
render() {
return (
<View style={styles.container}>
<View style={styles.header}>
<Text
style={{textAlign : 'center', fontSize : 50, fontFamily : "BMJUA_ttf", marginTop:50}}>FW IoT</Text>
</View>
<View style={styles.logo}>
<Image
style = {styles.img}
source={require('./assets/logo.png')}/>
</View>
<View style={styles.input_div}>
<View
style={StyleSheet.inputPart}>
<Text
style={{textAlign:'center',fontSize : 40, marginTop :20, fontFamily : "BMJUA_ttf"}}>Food Waste IoT</Text>
<Text
style={{textAlign:'center',fontSize : 15, marginTop :20, fontFamily : "BMJUA_ttf"}}>기기 등록</Text>
<TextInput
style={styles.input}
placeholder="ID"
placeholderTextColor="#66b3ff"
value={this.state.text}
onChangeText={(text) => this.setState({ ID: text })}
/>
<LoginButton
onPress={() => { this.props.navigation.navigate('MainScreen', { ID: this.state.ID }) }}
/>
</View>
</View>
<View style={styles.footer}>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
input: {
height: 50,
width: 250,
fontSize: 20,
alignSelf: 'center',
borderColor: "#0066cc",
borderWidth: 1,
backgroundColor:"white",
borderRadius: 10,
marginTop : 20,
},
input_title: {
textAlign:'center',
fontSize : 40,
marginTop :20,
},
container: {
flex: 1,
backgroundColor: 'white',
},
header: {
flex: 2,
backgroundColor: 'white',
},
logo: {
flex: 4,
justifyContent: "center",
alignItems: "center",
},
input_div :{
flex: 4,
backgroundColor: '#0149ff',
borderRadius : 20,
margin:20,
},
footer:{
flex : 1,
},
img:{
width:200,
resizeMode: 'contain',
alignSelf :'center',
marginStart : 30,
},
});