Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions docs/textinput.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,25 @@ The most basic use case is to plop down a `TextInput` and subscribe to the `onCh

```SnackPlayer name=TextInput
import React, { Component } from 'react';
import { TextInput } from 'react-native';
import { TextInput , SafeAreaView} from 'react-native';

const UselessTextInput = () => {
const [value, onChangeText] = React.useState('Useless Placeholder');

const [number, onChangeNumber] = React.useState('Phone number');
return (
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1 }}
onChangeText={text => onChangeText(text)}
value={value}
/>
<SafeAreaView>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1 }}
onChangeText={onChangeText}
value={value}
/>
<TextInput
style={{ height: 40, marginTop: 20, borderWidth: 1 }}
onChangeText={onChangeNumber}
placeholder={number}
keyboardType={'numeric'}
/>
</SafeAreaView>
);
}

Expand Down