react-native-dismiss-keyboard-views
v0.0.2
Published
Views and HOCs that trigger Keyboard.dismiss when touched
Downloads
8
Readme
react-native-dismiss-keyboard-views
This is based on a code snippet from this SO answer by Eric Kim
Usage
import {
DismissKeyboardView,
DismissKeyboardTouchableOpacity
} from 'react-native-dismiss-keyboard-views'
const view = (
<DismissKeyboardView style={someStyle}>
...
</DismissKeyboardView>
)
const touchable = (
<DismissKeyboardTouchableOpacity
onPress={() => console.log('Keyboard dismissed!')}
>
...
</DismissKeyboardTouchableOpacity>
)