Fix backgroundColor with TouchableHighlight

Reviewed By: blairvanderhoof

Differential Revision: D6575797

fbshipit-source-id: 913a5916def9719689917e83e917f44503b99a60
This commit is contained in:
Spencer Ahrens 2017-12-14 21:06:24 -08:00 committed by Facebook Github Bot
parent 88f6f69152
commit 5a1171ebfa
2 changed files with 3 additions and 16 deletions

View File

@ -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;

View File

@ -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}
>