-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
94 lines (92 loc) · 2 KB
/
App.tsx
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
import { StatusBar } from "expo-status-bar";
import React from "react";
import {
Keyboard,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
TouchableWithoutFeedback,
View,
} from "react-native";
export default function App() {
return (
<View style={styles.container}>
<TouchableWithoutFeedback
style={styles.touchable}
testID="touchable_view"
onPress={Keyboard.dismiss}
>
<View style={{ marginTop: 20, flex: 1 }}>
<TextInput
style={styles.input}
placeholder="Email"
testID="login_input_email"
/>
<TextInput
style={styles.input}
placeholder={"Password"}
testID="login_input_password"
/>
<TouchableOpacity
testID="login_cta_submit"
onPress={() => {}}
style={styles.btn}
>
<Text style={styles.btnText}>Submit</Text>
</TouchableOpacity>
</View>
</TouchableWithoutFeedback>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#ddd",
paddingVertical: 80,
paddingHorizontal: 20,
borderColor: "red",
borderWidth: 1,
justifyContent: "space-between",
},
touchable: {
borderColor: "yellow",
borderWidth: 1,
flex: 1,
},
keyboardAvoidingView: {
borderColor: "blue",
borderWidth: 1,
flex: 1,
},
btn: {
paddingVertical: 20,
paddingHorizontal: 40,
height: 60,
width: "100%",
borderRadius: 12,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#545454",
borderColor: "#888",
borderWidth: 1,
},
btnText: {
color: "#ddd",
textAlign: "center",
textTransform: "uppercase",
fontWeight: "bold",
fontSize: 16,
},
input: {
color: "#000",
height: 60,
paddingVertical: 10,
paddingHorizontal: 20,
borderColor: "#000",
borderWidth: 1,
marginBottom: 20,
borderRadius: 12,
},
});