diff --git a/examples/ExplorerApp/package.json b/examples/ExplorerApp/package.json index b004a7458..1b67ee988 100755 --- a/examples/ExplorerApp/package.json +++ b/examples/ExplorerApp/package.json @@ -5,7 +5,7 @@ "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest", - "update-lib": "rm -r node_modules/react-native-ui-kitten && npm install && ./node_modules/react-native/scripts/packager.sh ." + "update-lib": "rm -r node_modules/react-native-ui-kitten && npm install" }, "dependencies": { "prop-types": "^15.5.10", diff --git a/src/components/button/rkButton.js b/src/components/button/rkButton.js index bfa1f91d0..67adca9a6 100644 --- a/src/components/button/rkButton.js +++ b/src/components/button/rkButton.js @@ -117,10 +117,7 @@ import {RkComponent} from '../rkComponent' * `circle`, `small`, `medium`, `large`, `xlarge`, `clear`, `stretch` * @property {style} style - Style for button container * @property {style} contentStyle - Style for each button's children - * @property {function} onPress - Called when the touch is released, but not if cancelled. - * @property {function} onPressIn - Same as `TouchableWithoutFeedback.onPressIn` - * @property {function} onPressOut - Same as `TouchableWithoutFeedback.onPressOut` - * @property {function} onLongPress - Called when the touch is released and is longer than usual press, but not if cancelled + * @property {TouchableOpacity.props} props - All `TouchableOpacity` props also applied to `RkButton` */ export class RkButton extends RkComponent { @@ -164,17 +161,10 @@ export class RkButton extends RkComponent { } render() { - let a = this.context; let {container, content} = super.defineStyles(); - let touchableProps = { - onPress: this.props.onPress, - onPressIn: this.props.onPressIn, - onPressOut: this.props.onPressOut, - onLongPress: this.props.onLongPress - }; - + let {style, ...touchableProps} = this.props; return ( - + {this.props.children && this._renderChildren(content)} );