Fix inline styles eslint warnings for examples (#22123)

Summary:
Fixes `react-native/no-inline-styles` warning for several examples. I'm limiting the size of this PR to make it simpler to review.
Pull Request resolved: https://github.com/facebook/react-native/pull/22123

Reviewed By: RSNara

Differential Revision: D12929701

Pulled By: TheSavior

fbshipit-source-id: 7a976f2208b557fcfda46d5b586b30652c550eb2
This commit is contained in:
Ignacio Olaciregui
2018-11-08 17:17:26 -08:00
committed by Facebook Github Bot
parent bf2500e38e
commit 7b3c91ef16
12 changed files with 124 additions and 58 deletions

View File

@@ -231,7 +231,7 @@ class TouchableFeedbackEvents extends React.Component<{}, $FlowFixMeState> {
render() {
return (
<View testID="touchable_feedback_events">
<View style={[styles.row, {justifyContent: 'center'}]}>
<View style={[styles.row, styles.centered]}>
<TouchableOpacity
style={styles.wrapper}
testID="touchable_feedback_events_button"
@@ -269,7 +269,7 @@ class TouchableDelayEvents extends React.Component<{}, $FlowFixMeState> {
render() {
return (
<View testID="touchable_delay_events">
<View style={[styles.row, {justifyContent: 'center'}]}>
<View style={[styles.row, styles.centered]}>
<TouchableOpacity
style={styles.wrapper}
testID="touchable_delay_events_button"
@@ -317,7 +317,7 @@ class ForceTouchExample extends React.Component<{}, $FlowFixMeState> {
<View style={styles.forceTouchBox} testID="touchable_3dtouch_output">
<Text>{this._renderConsoleText()}</Text>
</View>
<View style={[styles.row, {justifyContent: 'center'}]}>
<View style={[styles.row, styles.centered]}>
<View
style={styles.wrapper}
testID="touchable_3dtouch_button"
@@ -355,7 +355,7 @@ class TouchableHitSlop extends React.Component<{}, $FlowFixMeState> {
return (
<View testID="touchable_hit_slop">
<View style={[styles.row, {justifyContent: 'center'}]}>
<View style={[styles.row, styles.centered]}>
<TouchableOpacity
onPress={this.onPress}
style={styles.hitSlopWrapper}
@@ -467,6 +467,9 @@ const styles = StyleSheet.create({
justifyContent: 'center',
flexDirection: 'row',
},
centered: {
justifyContent: 'center',
},
image: {
width: 50,
height: 50,