From 38b0c06440dc942f27112bfaee81e0d4f7e20b91 Mon Sep 17 00:00:00 2001 From: Matt Labrum Date: Thu, 28 Jul 2016 17:00:53 +0930 Subject: [PATCH] Update ripple polyfil to support flex on the touchable --- lib/polyfill/Ripple.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/polyfill/Ripple.js b/lib/polyfill/Ripple.js index 3fe577b..19e7af0 100644 --- a/lib/polyfill/Ripple.js +++ b/lib/polyfill/Ripple.js @@ -26,12 +26,14 @@ export default class Ripple extends Component { onPress: PropTypes.func, onLongPress: PropTypes.func, style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), - children: PropTypes.element.isRequired + children: PropTypes.element.isRequired, + flexTouchable: PropTypes.bool }; static defaultProps = { rippleColor: 'rgba(0,0,0,.2)', - elevation: null + elevation: null, + flexTouchable: false }; render() { @@ -69,6 +71,7 @@ export default class Ripple extends Component { onLongPress={onLongPress} onPressIn={this._highlight} onPressOut={this._unHighlight} + style={this.props.flexTouchable ? styles.touchableFlexStyle : {}} >