Skip to content

Commit 5a1171e

Browse files
sahrensfacebook-github-bot
authored andcommitted
Fix backgroundColor with TouchableHighlight
Reviewed By: blairvanderhoof Differential Revision: D6575797 fbshipit-source-id: 913a5916def9719689917e83e917f44503b99a60
1 parent 88f6f69 commit 5a1171e

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

Libraries/Components/Touchable/TouchableHighlight.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const TouchableHighlight = createReactClass({
189189
return {
190190
...this.touchableGetInitialState(),
191191
extraChildStyle: null,
192-
extraUnderlayStyle: styles.inactiveUnderlay,
192+
extraUnderlayStyle: null,
193193
};
194194
},
195195

@@ -285,7 +285,7 @@ const TouchableHighlight = createReactClass({
285285
if (this._hasPressHandler()) {
286286
this.setState({
287287
extraChildStyle: null,
288-
extraUnderlayStyle: styles.inactiveUnderlay,
288+
extraUnderlayStyle: null,
289289
});
290290
this.props.onHideUnderlay && this.props.onHideUnderlay();
291291
}
@@ -342,10 +342,4 @@ const TouchableHighlight = createReactClass({
342342
},
343343
});
344344

345-
const styles = StyleSheet.create({
346-
inactiveUnderlay: {
347-
backgroundColor: 'transparent',
348-
},
349-
});
350-
351345
module.exports = TouchableHighlight;

Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap

+1-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@ exports[`TouchableHighlight renders correctly 1`] = `
1717
onResponderTerminate={[Function]}
1818
onResponderTerminationRequest={[Function]}
1919
onStartShouldSetResponder={[Function]}
20-
style={
21-
Array [
22-
Object {},
23-
Object {
24-
"backgroundColor": "transparent",
25-
},
26-
]
27-
}
20+
style={Object {}}
2821
testID={undefined}
2922
tvParallaxProperties={undefined}
3023
>

0 commit comments

Comments
 (0)