-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
165 lines (117 loc) · 4.96 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import React from 'react';
import { StyleSheet, SafeAreaView, StatusBar, ScrollView, TouchableOpacity, Text, View, Button, TextInput, Alert, ImageBackground } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'
import { Header } from 'react-native-elements';
class App extends React.Component {
render() {
return (
<View
style={styles.container}>
<Header
containerStyle={{
backgroundColor: 'white',
justifyContent: 'space-around',
}}
leftComponent={{ icon: 'person', color: '#282C34' }}
centerComponent={{
text: 'Profile',
style: { fontWeight: "bold", color: '#000', fontSize: 18, alignSelf: "flex-start" }
}}
/>
<StatusBar translucent backgroundColor="black" />
<SafeAreaView
style={styles.container}
contentContainerStyle={{ flex: 1, justifyContent: "center" }} >
<ScrollView
contentInsetAdjustmentBehavior="automatic"
contentContainerStyle={{ flex: 1, justifyContent: "center" }}>
<KeyboardAwareScrollView
extraScrollHeight={40}
resetScrollToCoords={{ x: 0, y: 0 }}
enableOnAndroid={true}
keyboardVerticalOffset={100}
contentContainerStyle={{ flexGrow: 1, justifyContent: "center" }}
>
<View style={styles.containerInput}>
<View style={styles.viewStyle}>
<Icon name="user" size={20} color="#000" style={{ alignSelf: "center", alignItems: "center" }} />
<TextInput
placeholder="Enter first name" style={{ fontSize: 16, color: 'black', alignSelf: "center", alignItems: "center", marginLeft: 10, }}
/>
</View>
<View style={styles.viewStyle}>
<Icon name="user" size={20} color="#000" style={{ alignSelf: "center", alignItems: "center" }} />
<TextInput
placeholder="Enter last name" style={{ fontSize: 16, color: 'black', alignSelf: "center", alignItems: "center", marginLeft: 10, }}
/>
</View>
<View style={styles.viewStyle}>
<Icon name="envelope" size={20} color="#000" style={{ alignSelf: "center", alignItems: "center" }} />
<TextInput placeholder="Enter email" keyboardType={'email-address'}
style={{ fontSize: 16, color: 'black', alignSelf: "center", alignItems: "center", marginLeft: 10, }} />
</View>
<View style={styles.viewStyle}>
<Icon name="phone" size={20} color="#000" style={{ alignSelf: "center", alignItems: "center" }} />
<TextInput placeholder="Enter mobile number" keyboardType={'numeric'}
style={{ fontSize: 16, color: 'black', alignSelf: "center", alignItems: "center", marginLeft: 10, }} />
</View>
<View style={styles.viewStyle}>
<Icon name="home" size={20} color="#000" style={{ alignSelf: "center", alignItems: "center" }} />
<TextInput placeholder="Enter address" style={{ fontSize: 16, color: 'black', alignSelf: "center", alignItems: "center", marginLeft: 10, }} />
</View>
<View style={styles.viewStyle}>
<Icon name="lock" size={20} color="#000" style={{ alignSelf: "center", alignItems: "center" }} />
<TextInput placeholder="Enter password" secureTextEntry={true} style={{ fontSize: 16, color: '', alignSelf: "center", alignItems: "center", marginLeft: 10, }} />
</View>
<TouchableOpacity style={styles.loginBtn}>
<Text style={styles.textStyle}>Submit</Text>
</TouchableOpacity>
</View>
</KeyboardAwareScrollView>
</ScrollView>
</SafeAreaView>
</View>
);
}
}
export default App;
const styles = StyleSheet.create({
containerInput: {
justifyContent: 'center',
width: "100%",
alignContent: 'center',
alignItems: "center",
alignSelf: 'center',
}, container: {
flex: 1,
width: "100%",
flexDirection: "column",
justifyContent: "center",
backgroundColor: "#282C34",
},
viewStyle: {
width: "90%", flexDirection: 'row',
height: 40, borderColor: 'white', borderRadius: 25,
backgroundColor: 'rgba(255,255,255,.9)',
paddingLeft: 10, margin: 10,
},
loginBtn: {
width: "90%",
backgroundColor: "#EAB15A",
borderRadius: 25,
height: 40,
alignItems: "center",
justifyContent: "center",
marginTop: 40,
marginBottom: 10
},
textStyle: {
color: "white",
fontSize: 16,
width: "80%",
height: 40,
padding: 10,
textAlign: "center",
},
});