-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
134 lines (113 loc) · 2.6 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* jshint esversion: 6 */
import React from 'react';
import {
StyleSheet,
Text,
View,
Platform,
TextInput,
ImageBackground,
TouchableOpacity,
KeyboardAvoidingView } from 'react-native';
export default function Login() {
return (
<KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : null} style={styles.container}>
<View style={styles.container}>
<ImageBackground source={require('./assets/background.png')} style={styles.image}>
<View style={styles.formContainer}>
<Text style={styles.header}> Hungry? </Text>
<Text style={styles.headerText}> Log in to view our sumptuous menu </Text>
<TextInput style={styles.input} placeholder=' Username/Email' />
<TextInput style={styles.input} placeholder=' Password' secureTextEntry={true} />
<TouchableOpacity style={styles.button}>
<Text style={styles.loginText}>Log In</Text>
</TouchableOpacity>
</View>
</ImageBackground>
</View>
</KeyboardAvoidingView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
formContainer: {
padding: 25,
justifyContent: 'center',
alignItems: 'center',
height: 200,
},
header: {
color: '#000',
fontSize: 20,
fontWeight: 'bold',
textAlign: 'left'
},
headerText: {
justifyContent: 'center',
alignItems: 'center',
height: 100,
},
image: {
flex: 1,
position:'absolute',
width: '100%',
height: '100%',
resizeMode: "cover",
justifyContent: "center"
},
text: {
color: '#fff',
fontSize: 25,
fontWeight: "bold",
textAlign: "center",
},
content: {
fontSize: 15,
fontWeight: "bold",
textAlign: "center",
},
input: {
width: 350,
height: 50,
borderColor: '#dbe5e3',
backgroundColor: '#ffffff',
borderWidth: 1,
marginBottom: 20,
borderRadius: 5,
shadowColor: '#dbe5e3',
shadowRadius: 6.5,
elevation: 12,
shadowOpacity: 0.35,
shadowOffset: {
width: 0,
height: 5,
}
},
button: {
alignItems: "center",
justifyContent: 'center',
backgroundColor: "#000",
padding: 10,
width: 350,
height: 50,
borderRadius: 8,
shadowColor: '#000',
shadowRadius: 6.5,
elevation: 12,
shadowOpacity: 0.35,
shadowOffset: {
width: 0,
height: 5,
}
},
loginText: {
color: 'white',
fontSize: 16,
fontWeight: 'bold'
},
});