react-native-screen-keyboard
Advanced tools
Comparing version 1.1.1 to 1.2.0
{ | ||
"name": "react-native-screen-keyboard", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "On-screen keyboard with customisable keys and tactile / UI feedback 📱", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -183,8 +183,11 @@ /** | ||
// Decide if the element passed as the key is text | ||
const keyJsx = keyboardFuncSet[row][column] ? ( | ||
<Image style={[keyImageDefaultStyle, keyImageStyle]} source={entity} /> | ||
) : ( | ||
<Text style={[keyTextDefaultStyle, keyTextStyle]}>{entity}</Text> | ||
); | ||
// Decide what type of element is passed as the key | ||
let keyJsx; | ||
if (React.isValidElement(entity)) { | ||
keyJsx = entity; | ||
} else if (keyboardFuncSet[row][column]) { | ||
keyJsx = <Image style={[keyImageDefaultStyle, keyImageStyle]} source={entity} />; | ||
} else { | ||
keyJsx = <Text style={[keyTextDefaultStyle, keyTextStyle]}>{entity}</Text>; | ||
} | ||
@@ -191,0 +194,0 @@ // We want to block keyboard interactions if it has been disabled. |
21756
359