react-native-virtual-keyboard
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "react-native-virtual-keyboard", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "React native's software/virtual numeric keyboard, which can be used instead of Android/iOS ones if it suits your app style better.", | ||
@@ -5,0 +5,0 @@ "main": "./src/VirtualKeyboard.js", |
@@ -50,2 +50,3 @@ [![NPM version](https://badge.fury.io/js/react-native-virtual-keyboard.svg)](http://badge.fury.io/js/react-native-virtual-keyboard) | ||
| applyBackspaceTint | bool | true | tint backspace with tintColor style option, or leave it as it is | | ||
| decimal | bool | false | display '.' decimal on keyboard | | ||
@@ -52,0 +53,0 @@ ## Contribution |
@@ -21,2 +21,3 @@ 'use strict'; | ||
applyBackspaceTint: React.PropTypes.bool, | ||
decimal: React.PropTypes.bool, | ||
} | ||
@@ -29,2 +30,3 @@ | ||
applyBackspaceTint: true, | ||
decimal: false, | ||
} | ||
@@ -46,3 +48,3 @@ | ||
<View style={styles.row}> | ||
<View style={{ flex: 1 }} /> | ||
{this.props.decimal ? this.Cell('.') : <View style={{ flex: 1 }} /> } | ||
{this.Cell(0)} | ||
@@ -72,6 +74,6 @@ {this.Backspace()} | ||
Cell(number) { | ||
Cell(symbol) { | ||
return ( | ||
<TouchableOpacity style={styles.cell} key={number} accessibilityLabel={number.toString()} onPress={() => { this.onPress(number.toString()) }}> | ||
<Text style={[styles.number, { color: this.props.color }]}>{number}</Text> | ||
<TouchableOpacity style={styles.cell} key={symbol} accessibilityLabel={symbol.toString()} onPress={() => { this.onPress(symbol.toString()) }}> | ||
<Text style={[styles.number, { color: this.props.color }]}>{symbol}</Text> | ||
</TouchableOpacity> | ||
@@ -87,2 +89,4 @@ ); | ||
curText = curText.slice(0, -1); | ||
} else { | ||
curText += val; | ||
} | ||
@@ -89,0 +93,0 @@ } else { |
Sorry, the diff of this file is not supported yet
5441
113
55