Skip to content

Commit 878bf06

Browse files
authored
chore: textInput usage example (#262)
1 parent ffcf810 commit 878bf06

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Example/Map.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ import {
55
Text,
66
TouchableWithoutFeedback,
77
View,
8+
TextInput,
89
} from 'react-native'
910
import BottomSheet from 'reanimated-bottom-sheet'
1011

1112
export default class Example extends React.Component {
1213
renderInner = () => (
1314
<View style={styles.panel}>
15+
<TextInput
16+
style={styles.search}
17+
onFocus={() => {
18+
this.bs.current.snapTo(1)
19+
}}
20+
placeholder="search"
21+
/>
1422
<Text style={styles.panelTitle}>San Francisco Airport</Text>
1523
<Text style={styles.panelSubtitle}>
1624
International Airport - 40 miles away
@@ -59,6 +67,13 @@ export default class Example extends React.Component {
5967
const IMAGE_SIZE = 200
6068

6169
const styles = StyleSheet.create({
70+
search: {
71+
borderColor: 'gray',
72+
borderWidth: StyleSheet.hairlineWidth,
73+
height: 40,
74+
borderRadius: 10,
75+
paddingHorizontal: 15,
76+
},
6277
container: {
6378
flex: 1,
6479
backgroundColor: '#F5FCFF',

0 commit comments

Comments
 (0)