-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
38 lines (34 loc) · 1.1 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
import React from 'react';
import {SafeAreaView, TextInput} from 'react-native';
import {GluestackUIProvider, Input, InputField} from '@gluestack-ui/themed';
import {config} from '@gluestack-ui/config';
const App = () => {
const [text, onChangeText] = React.useState('Useless Text');
return (
<SafeAreaView>
<TextInput
style={{borderWidth: 1, margin: 10}}
onChangeText={onChangeText}
value={text}
onKeyPress={({nativeEvent}) => console.log('nativeEvent TextInput', nativeEvent)}
multiline
/>
<GluestackUIProvider config={config}>
<Input
variant="outline"
size="md"
>
<InputField
placeholder="Enter Text here"
onKeyPress={({nativeEvent}) => console.log('nativeEvent InputField', nativeEvent)}
// onKeyPress={({nativeEvent}) => {
// console.log(`InputField-onKeyPress: ${nativeEvent.key}`, { nativeEvent });
// }}
multiline
/>
</Input>
</GluestackUIProvider>
</SafeAreaView>
);
};
export default App;