@3beeepb/react-native-keyboard-dismiss
Advanced tools
Comparing version 1.0.7 to 1.0.8
11
index.js
import React from 'react' | ||
import { TouchableWithoutFeedback, Keyboard, View } from 'react-native' | ||
export default KeyboardDismiss = (children) => { | ||
return ( | ||
const KeyboardDismissHOC = (Comp) => { | ||
return ({children, ...props}) => ( | ||
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}> | ||
<View style={{flex:1}}> | ||
{children} | ||
<Comp {...props}> | ||
{children} | ||
</Comp> | ||
</View> | ||
</TouchableWithoutFeedback> | ||
) | ||
} | ||
} | ||
export default KeyboardDismiss = KeyboardDismissHOC(View) |
{ | ||
"name": "@3beeepb/react-native-keyboard-dismiss", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "A simple way to dismiss the keyboard programmatically in a React Native application.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3312
13
0