Skip to content

Commit

Permalink
Fix backgroundColor with TouchableHighlight
Browse files Browse the repository at this point in the history
Reviewed By: blairvanderhoof

Differential Revision: D6575797

fbshipit-source-id: 913a5916def9719689917e83e917f44503b99a60
  • Loading branch information
sahrens authored and facebook-github-bot committed Dec 15, 2017
1 parent 88f6f69 commit 5a1171e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
10 changes: 2 additions & 8 deletions Libraries/Components/Touchable/TouchableHighlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const TouchableHighlight = createReactClass({
return {
...this.touchableGetInitialState(),
extraChildStyle: null,
extraUnderlayStyle: styles.inactiveUnderlay,
extraUnderlayStyle: null,
};
},

Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -342,10 +342,4 @@ const TouchableHighlight = createReactClass({
},
});

const styles = StyleSheet.create({
inactiveUnderlay: {
backgroundColor: 'transparent',
},
});

module.exports = TouchableHighlight;
Original file line number Diff line number Diff line change
Expand Up @@ -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}
>
Expand Down

0 comments on commit 5a1171e

Please sign in to comment.