From 5a1171ebfaaedd9c7d5f1bfcf306049c3671a733 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Thu, 14 Dec 2017 21:06:24 -0800 Subject: [PATCH] Fix backgroundColor with TouchableHighlight Reviewed By: blairvanderhoof Differential Revision: D6575797 fbshipit-source-id: 913a5916def9719689917e83e917f44503b99a60 --- Libraries/Components/Touchable/TouchableHighlight.js | 10 ++-------- .../__snapshots__/TouchableHighlight-test.js.snap | 9 +-------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/Libraries/Components/Touchable/TouchableHighlight.js b/Libraries/Components/Touchable/TouchableHighlight.js index 173d229aa..40e3a0f00 100644 --- a/Libraries/Components/Touchable/TouchableHighlight.js +++ b/Libraries/Components/Touchable/TouchableHighlight.js @@ -189,7 +189,7 @@ const TouchableHighlight = createReactClass({ return { ...this.touchableGetInitialState(), extraChildStyle: null, - extraUnderlayStyle: styles.inactiveUnderlay, + extraUnderlayStyle: null, }; }, @@ -285,7 +285,7 @@ const TouchableHighlight = createReactClass({ if (this._hasPressHandler()) { this.setState({ extraChildStyle: null, - extraUnderlayStyle: styles.inactiveUnderlay, + extraUnderlayStyle: null, }); this.props.onHideUnderlay && this.props.onHideUnderlay(); } @@ -342,10 +342,4 @@ const TouchableHighlight = createReactClass({ }, }); -const styles = StyleSheet.create({ - inactiveUnderlay: { - backgroundColor: 'transparent', - }, -}); - module.exports = TouchableHighlight; diff --git a/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap b/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap index ffd03d18e..4596f0307 100644 --- a/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap +++ b/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap @@ -17,14 +17,7 @@ exports[`TouchableHighlight renders correctly 1`] = ` onResponderTerminate={[Function]} onResponderTerminationRequest={[Function]} onStartShouldSetResponder={[Function]} - style={ - Array [ - Object {}, - Object { - "backgroundColor": "transparent", - }, - ] - } + style={Object {}} testID={undefined} tvParallaxProperties={undefined} >