-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
46 lines (44 loc) · 927 Bytes
/
App.js
File metadata and controls
46 lines (44 loc) · 927 Bytes
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
import * as React from 'react';
import {
TextInput,
KeyboardAvoidingView,
StyleSheet,
View,
Dimensions,
SafeAreaView,
} from 'react-native';
export default function App() {
return (
<KeyboardAvoidingView
behavior="padding"
style={styles.container}
keyboardVerticalOffset={200}>
<SafeAreaView style={{flex: 1}}>
<View style={{flex: 1}}>
<TextInput style={styles.paragraph} placeholder="Click here" />
<View style={styles.button} />
</View>
</SafeAreaView>
</KeyboardAvoidingView>
);
}
const {width} = Dimensions.get('screen');
const styles = StyleSheet.create({
container: {
flex: 1,
},
paragraph: {
margin: 24,
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
},
button: {
position: 'absolute',
backgroundColor: 'blue',
width: width,
height: 20,
bottom: 0,
left: 0,
},
});