Browse Source

fully linted

Daniel Zlotin 6 years ago
parent
commit
78f47a5c3c

+ 2
- 2
playground/src/screens/BackHandlerScreen.js View File

34
       <View style={styles.root}>
34
       <View style={styles.root}>
35
         <Text style={styles.h1}>{`Back Handler Screen`}</Text>
35
         <Text style={styles.h1}>{`Back Handler Screen`}</Text>
36
         <Text style={styles.h2}>{this.state.backPress}</Text>
36
         <Text style={styles.h2}>{this.state.backPress}</Text>
37
-        <Button title="add back handler" onPress={this.addBackHandler} />
38
-        <Button title="remove back handler" onPress={this.removeBackHandler} />
37
+        <Button title='add back handler' onPress={this.addBackHandler} />
38
+        <Button title='remove back handler' onPress={this.removeBackHandler} />
39
       </View>
39
       </View>
40
     );
40
     );
41
   }
41
   }

+ 1
- 1
playground/src/screens/CustomDialog.js View File

12
     return (
12
     return (
13
       <View style={styles.root}>
13
       <View style={styles.root}>
14
         <Text style={styles.h1} testID={testIDs.DIALOG_HEADER}>Test view</Text>
14
         <Text style={styles.h1} testID={testIDs.DIALOG_HEADER}>Test view</Text>
15
-        <Button title="OK" testID={testIDs.OK_BUTTON} onPress={() => this.onCLickOk()} />
15
+        <Button title='OK' testID={testIDs.OK_BUTTON} onPress={() => this.onCLickOk()} />
16
       </View>
16
       </View>
17
     );
17
     );
18
   }
18
   }

+ 11
- 9
playground/src/screens/CustomTransitionOrigin.js View File

21
   render() {
21
   render() {
22
     return (
22
     return (
23
       <View style={styles.root}>
23
       <View style={styles.root}>
24
-        <Navigation.Element elementId="title1">
24
+        <Navigation.Element elementId='title1'>
25
           <Text style={styles.h1}>Custom Transition Screen</Text>
25
           <Text style={styles.h1}>Custom Transition Screen</Text>
26
         </Navigation.Element>
26
         </Navigation.Element>
27
         <View style={{ flex: 1, justifyContent: 'flex-start' }}>
27
         <View style={{ flex: 1, justifyContent: 'flex-start' }}>
28
-          <TouchableOpacity testID="shared_image1" activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
29
-            <Navigation.Element resizeMode="cover" elementId="image1">
30
-              <Image resizeMode="cover" style={styles.gyroImage} source={require('../../img/400.jpeg')} />
28
+          <TouchableOpacity testID='shared_image1' activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
29
+            <Navigation.Element resizeMode='cover' elementId='image1'>
30
+              <Image resizeMode='cover' style={styles.gyroImage} source={require('../../img/400.jpeg')} />
31
             </Navigation.Element>
31
             </Navigation.Element>
32
           </TouchableOpacity>
32
           </TouchableOpacity>
33
           <TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
33
           <TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
34
-            <Navigation.Element elementId="image2">
34
+            <Navigation.Element elementId='image2'>
35
               <Image style={styles.gyroImage} source={require('../../img/2048.jpeg')} />
35
               <Image style={styles.gyroImage} source={require('../../img/2048.jpeg')} />
36
             </Navigation.Element>
36
             </Navigation.Element>
37
           </TouchableOpacity>
37
           </TouchableOpacity>
38
           <TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
38
           <TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
39
-            <Navigation.Element elementId="image3">
39
+            <Navigation.Element elementId='image3'>
40
               <Image style={styles.gyroImage} source={require('../../img/Icon-87.png')} />
40
               <Image style={styles.gyroImage} source={require('../../img/Icon-87.png')} />
41
             </Navigation.Element>
41
             </Navigation.Element>
42
           </TouchableOpacity>
42
           </TouchableOpacity>
43
           <TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
43
           <TouchableOpacity activeOpacity={0.5} onPress={this.onClickNavigationIcon}>
44
-            <Navigation.Element elementId="image4">
44
+            <Navigation.Element elementId='image4'>
45
               <Image style={styles.gyroImage} source={require('../../img/Icon-87.png')} />
45
               <Image style={styles.gyroImage} source={require('../../img/Icon-87.png')} />
46
             </Navigation.Element>
46
             </Navigation.Element>
47
           </TouchableOpacity>
47
           </TouchableOpacity>
57
         customTransition: {
57
         customTransition: {
58
           animations: [
58
           animations: [
59
             { type: 'sharedElement', fromId: 'title1', toId: 'title2', startDelay: 0, springVelocity: 0.2, duration: 0.5 },
59
             { type: 'sharedElement', fromId: 'title1', toId: 'title2', startDelay: 0, springVelocity: 0.2, duration: 0.5 },
60
-            { type: 'sharedElement', fromId: 'image1', toId: 'customDestinationImage', startDelay: 0, springVelocity: 0.9, springDamping: 0.9, duration: 0.8, interactivePop: true },
60
+            {
61
+              type: 'sharedElement', fromId: 'image1', toId: 'customDestinationImage', startDelay: 0, springVelocity: 0.9,
62
+              springDamping: 0.9, duration: 0.8, interactivePop: true
63
+            },
61
             { type: 'sharedElement', fromId: 'image2', toId: 'customDestinationImage2', startDelay: 0, duration: 0.8 },
64
             { type: 'sharedElement', fromId: 'image2', toId: 'customDestinationImage2', startDelay: 0, duration: 0.8 },
62
             { fromId: 'image4', endY: 50, endX: 50, endAlpha: 0, startDelay: 0, duration: 0.8, springVelocity: 0.5 },
65
             { fromId: 'image4', endY: 50, endX: 50, endAlpha: 0, startDelay: 0, duration: 0.8, springVelocity: 0.5 },
63
             { fromId: 'customDestinationParagraph', startY: 50, startAlpha: 0, endAlpha: 1, startDelay: 0, duration: 0.8 }
66
             { fromId: 'customDestinationParagraph', startY: 50, startAlpha: 0, endAlpha: 1, startDelay: 0, duration: 0.8 }
94
     height: 100
97
     height: 100
95
   }
98
   }
96
 };
99
 };
97
-

+ 1
- 1
playground/src/screens/LifecycleScreen.js View File

36
       <View style={styles.root}>
36
       <View style={styles.root}>
37
         <Text style={styles.h1}>{`Lifecycle Screen`}</Text>
37
         <Text style={styles.h1}>{`Lifecycle Screen`}</Text>
38
         <Text style={styles.h1}>{this.state.text}</Text>
38
         <Text style={styles.h1}>{this.state.text}</Text>
39
-        <Button title="Push to test didDisappear" testID={testIDs.PUSH_TO_TEST_DID_DISAPPEAR_BUTTON} onPress={this.onClickPush} />
39
+        <Button title='Push to test didDisappear' testID={testIDs.PUSH_TO_TEST_DID_DISAPPEAR_BUTTON} onPress={this.onClickPush} />
40
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
40
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
41
       </View>
41
       </View>
42
     );
42
     );

+ 12
- 9
playground/src/screens/ModalScreen.js View File

33
       <View style={styles.root}>
33
       <View style={styles.root}>
34
         <Text style={styles.h1} testID={testIDs.MODAL_SCREEN}>{`Modal Screen`}</Text>
34
         <Text style={styles.h1} testID={testIDs.MODAL_SCREEN}>{`Modal Screen`}</Text>
35
         <Text style={styles.footer}>{`Modal Stack Position: ${this.getModalPosition()}`}</Text>
35
         <Text style={styles.footer}>{`Modal Stack Position: ${this.getModalPosition()}`}</Text>
36
-        <Button title="Show Modal" testID={testIDs.SHOW_MODAL_BUTTON} onPress={this.onClickShowModal} />
37
-        <Button title="Dismiss Modal" testID={testIDs.DISMISS_MODAL_BUTTON} onPress={this.onClickDismissModal} />
38
-        <Button title="Dismiss Unknown Modal" testID={testIDs.DISMISS_UNKNOWN_MODAL_BUTTON} onPress={this.onClickDismissUnknownModal} />
39
-        <Button title="Dismiss All Modals" testID={testIDs.DISMISS_ALL_MODALS_BUTTON} onPress={this.onClickDismissAllModals} />
40
-        <Button title="Push screen" testID={testIDs.PUSH_BUTTON} onPress={this.onClickPushScreen} />
41
-        <Button title="Show Modal With Stack" testID={testIDs.MODAL_WITH_STACK_BUTTON} onPress={this.onShowModalWithDeepStack} />
42
-        {this.getPreviousModalId() ? (<Button title="Dismiss Previous Modal" testID={testIDs.DISMISS_PREVIOUS_MODAL_BUTTON} onPress={this.onClickDismissPreviousModal} />) : undefined}
43
-        {this.props.previousModalIds ? (<Button title="Dismiss ALL Previous Modals" testID={testIDs.DISMISS_ALL_PREVIOUS_MODAL_BUTTON} onPress={this.onClickDismissAllPreviousModals} />) : undefined}
44
-        {this.props.previousModalIds ? (<Button title="Dismiss First In Stack" testID={testIDs.DISMISS_FIRST_MODAL_BUTTON} onPress={this.onClickDismissFirstInStack} />) : undefined}
36
+        <Button title='Show Modal' testID={testIDs.SHOW_MODAL_BUTTON} onPress={this.onClickShowModal} />
37
+        <Button title='Dismiss Modal' testID={testIDs.DISMISS_MODAL_BUTTON} onPress={this.onClickDismissModal} />
38
+        <Button title='Dismiss Unknown Modal' testID={testIDs.DISMISS_UNKNOWN_MODAL_BUTTON} onPress={this.onClickDismissUnknownModal} />
39
+        <Button title='Dismiss All Modals' testID={testIDs.DISMISS_ALL_MODALS_BUTTON} onPress={this.onClickDismissAllModals} />
40
+        <Button title='Push screen' testID={testIDs.PUSH_BUTTON} onPress={this.onClickPushScreen} />
41
+        <Button title='Show Modal With Stack' testID={testIDs.MODAL_WITH_STACK_BUTTON} onPress={this.onShowModalWithDeepStack} />
42
+        {this.getPreviousModalId() ? (<Button title='Dismiss Previous Modal' testID={testIDs.DISMISS_PREVIOUS_MODAL_BUTTON}
43
+          onPress={this.onClickDismissPreviousModal} />) : undefined}
44
+        {this.props.previousModalIds ? (<Button title='Dismiss ALL Previous Modals' testID={testIDs.DISMISS_ALL_PREVIOUS_MODAL_BUTTON}
45
+          onPress={this.onClickDismissAllPreviousModals} />) : undefined}
46
+        {this.props.previousModalIds ? (<Button title='Dismiss First In Stack' testID={testIDs.DISMISS_FIRST_MODAL_BUTTON}
47
+          onPress={this.onClickDismissFirstInStack} />) : undefined}
45
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
48
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
46
       </View>
49
       </View>
47
     );
50
     );

+ 12
- 12
playground/src/screens/OptionsScreen.js View File

57
     return (
57
     return (
58
       <View style={styles.root}>
58
       <View style={styles.root}>
59
         <Text style={styles.h1} testID={testIDs.OPTIONS_SCREEN_HEADER}>{`Options Screen`}</Text>
59
         <Text style={styles.h1} testID={testIDs.OPTIONS_SCREEN_HEADER}>{`Options Screen`}</Text>
60
-        <Button title="Dynamic Options" testID={testIDs.DYNAMIC_OPTIONS_BUTTON} onPress={this.onClickDynamicOptions} />
61
-        <Button title="Show Top Bar" testID={testIDs.SHOW_TOP_BAR_BUTTON} onPress={this.onClickShowTopBar} />
62
-        <Button title="Hide Top Bar" testID={testIDs.HIDE_TOP_BAR_BUTTON} onPress={this.onClickHideTopBar} />
63
-        <Button title="Top Bar Transparent" onPress={this.onClickTopBarTransparent} />
64
-        <Button title="Top Bar Opaque" onPress={this.onClickTopBarOpaque} />
65
-        <Button title="scrollView Screen" testID={testIDs.SCROLLVIEW_SCREEN_BUTTON} onPress={this.onClickScrollViewScreen} />
66
-        <Button title="Custom Transition" onPress={this.onClickCustomTranstition} />
67
-        <Button title="Show custom alert" testID={testIDs.SHOW_CUSTOM_ALERT_BUTTON} onPress={this.onClickAlert} />
68
-        <Button title="Show snackbar" testID={testIDs.SHOW_SNACKBAR_BUTTON} onPress={this.onClickSnackbar} />
69
-        <Button title="Show overlay" testID={testIDs.SHOW_OVERLAY_BUTTON} onPress={() => this.onClickShowOverlay(true)} />
70
-        <Button title="Show touch through overlay" testID={testIDs.SHOW_TOUCH_THROUGH_OVERLAY_BUTTON} onPress={() => this.onClickShowOverlay(false)} />
71
-        <Button title="Push Default Options Screen" testID={testIDs.PUSH_DEFAULT_OPTIONS_BUTTON} onPress={this.onClickPushDefaultOptionsScreen} />
60
+        <Button title='Dynamic Options' testID={testIDs.DYNAMIC_OPTIONS_BUTTON} onPress={this.onClickDynamicOptions} />
61
+        <Button title='Show Top Bar' testID={testIDs.SHOW_TOP_BAR_BUTTON} onPress={this.onClickShowTopBar} />
62
+        <Button title='Hide Top Bar' testID={testIDs.HIDE_TOP_BAR_BUTTON} onPress={this.onClickHideTopBar} />
63
+        <Button title='Top Bar Transparent' onPress={this.onClickTopBarTransparent} />
64
+        <Button title='Top Bar Opaque' onPress={this.onClickTopBarOpaque} />
65
+        <Button title='scrollView Screen' testID={testIDs.SCROLLVIEW_SCREEN_BUTTON} onPress={this.onClickScrollViewScreen} />
66
+        <Button title='Custom Transition' onPress={this.onClickCustomTranstition} />
67
+        <Button title='Show custom alert' testID={testIDs.SHOW_CUSTOM_ALERT_BUTTON} onPress={this.onClickAlert} />
68
+        <Button title='Show snackbar' testID={testIDs.SHOW_SNACKBAR_BUTTON} onPress={this.onClickSnackbar} />
69
+        <Button title='Show overlay' testID={testIDs.SHOW_OVERLAY_BUTTON} onPress={() => this.onClickShowOverlay(true)} />
70
+        <Button title='Show touch through overlay' testID={testIDs.SHOW_TOUCH_THROUGH_OVERLAY_BUTTON} onPress={() => this.onClickShowOverlay(false)} />
71
+        <Button title='Push Default Options Screen' testID={testIDs.PUSH_DEFAULT_OPTIONS_BUTTON} onPress={this.onClickPushDefaultOptionsScreen} />
72
         <Text style={styles.footer}>{`this.props.containerId = ${this.props.containerId}`}</Text>
72
         <Text style={styles.footer}>{`this.props.containerId = ${this.props.containerId}`}</Text>
73
       </View>
73
       </View>
74
     );
74
     );

+ 2
- 2
playground/src/screens/OrientationDetectScreen.js View File

21
     return (
21
     return (
22
       <View style={styles.root} onLayout={this.detectHorizontal}>
22
       <View style={styles.root} onLayout={this.detectHorizontal}>
23
         <Text style={styles.h1}>{`Orientation Screen`}</Text>
23
         <Text style={styles.h1}>{`Orientation Screen`}</Text>
24
-        <Button title="Dismiss" testID={testIDs.DISMISS_BUTTON} onPress={() => Navigation.dismissModal(this.props.componentId)} />
24
+        <Button title='Dismiss' testID={testIDs.DISMISS_BUTTON} onPress={() => Navigation.dismissModal(this.props.componentId)} />
25
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
25
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
26
-        <Text style={styles.footer} testID="currentOrientation">{this.state.horizontal ? 'Landscape' : 'Portrait'}</Text>
26
+        <Text style={styles.footer} testID='currentOrientation'>{this.state.horizontal ? 'Landscape' : 'Portrait'}</Text>
27
       </View>
27
       </View>
28
     );
28
     );
29
   }
29
   }

+ 4
- 4
playground/src/screens/OrientationSelectScreen.js View File

11
     return (
11
     return (
12
       <View style={styles.root}>
12
       <View style={styles.root}>
13
         <Text style={styles.h1}>{`Orientation Menu`}</Text>
13
         <Text style={styles.h1}>{`Orientation Menu`}</Text>
14
-        <Button title="default" testID={testIDs.DEFAULT_ORIENTATION_BUTTON} onPress={() => this.onClickOrientationScreen('default')} />
15
-        <Button title="landscape and portrait" testID={testIDs.LANDSCAPE_PORTRAIT_ORIENTATION_BUTTON} onPress={() => this.onClickOrientationScreen(['landscape', 'portrait'])} />
16
-        <Button title="portrait only" testID={testIDs.PORTRAIT_ORIENTATION_BUTTON} onPress={() => this.onClickOrientationScreen('portrait')} />
17
-        <Button title="landscape only" testID={testIDs.LANDSCAPE_ORIENTATION_BUTTON} onPress={() => this.onClickOrientationScreen(['landscape'])} />
14
+        <Button title='default' testID={testIDs.DEFAULT_ORIENTATION_BUTTON} onPress={() => this.onClickOrientationScreen('default')} />
15
+        <Button title='landscape and portrait' testID={testIDs.LANDSCAPE_PORTRAIT_ORIENTATION_BUTTON} onPress={() => this.onClickOrientationScreen(['landscape', 'portrait'])} />
16
+        <Button title='portrait only' testID={testIDs.PORTRAIT_ORIENTATION_BUTTON} onPress={() => this.onClickOrientationScreen('portrait')} />
17
+        <Button title='landscape only' testID={testIDs.LANDSCAPE_ORIENTATION_BUTTON} onPress={() => this.onClickOrientationScreen(['landscape'])} />
18
       </View>
18
       </View>
19
     );
19
     );
20
   }
20
   }

+ 5
- 5
playground/src/screens/PushedScreen.js View File

32
       <View style={styles.root}>
32
       <View style={styles.root}>
33
         <Text testID={testIDs.PUSHED_SCREEN_HEADER} style={styles.h1}>{`Pushed Screen`}</Text>
33
         <Text testID={testIDs.PUSHED_SCREEN_HEADER} style={styles.h1}>{`Pushed Screen`}</Text>
34
         <Text style={styles.h2}>{`Stack Position: ${stackPosition}`}</Text>
34
         <Text style={styles.h2}>{`Stack Position: ${stackPosition}`}</Text>
35
-        <Button title="Push" testID={testIDs.PUSH_BUTTON} onPress={this.onClickPush} />
36
-        <Button title="Pop" testID={testIDs.POP_BUTTON} onPress={this.onClickPop} />
37
-        <Button title="Pop Previous" testID={testIDs.POP_PREVIOUS_BUTTON} onPress={this.onClickPopPrevious} />
38
-        <Button title="Pop To Root" testID={testIDs.POP_TO_ROOT} onPress={this.onClickPopToRoot} />
39
-        {stackPosition > 2 && <Button title="Pop To Stack Position 1" testID={testIDs.POP_STACK_POSITION_ONE_BUTTON} onPress={this.onClickPopToFirstPosition} />}
35
+        <Button title='Push' testID={testIDs.PUSH_BUTTON} onPress={this.onClickPush} />
36
+        <Button title='Pop' testID={testIDs.POP_BUTTON} onPress={this.onClickPop} />
37
+        <Button title='Pop Previous' testID={testIDs.POP_PREVIOUS_BUTTON} onPress={this.onClickPopPrevious} />
38
+        <Button title='Pop To Root' testID={testIDs.POP_TO_ROOT} onPress={this.onClickPopToRoot} />
39
+        {stackPosition > 2 && <Button title='Pop To Stack Position 1' testID={testIDs.POP_STACK_POSITION_ONE_BUTTON} onPress={this.onClickPopToFirstPosition} />}
40
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
40
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
41
       </View>
41
       </View>
42
     );
42
     );

+ 1
- 2
playground/src/screens/ScrollViewScreen.js View File

30
       <View>
30
       <View>
31
         <ScrollView testID={testIDs.SCROLLVIEW_ELEMENT} contentContainerStyle={styles.contentContainer}>
31
         <ScrollView testID={testIDs.SCROLLVIEW_ELEMENT} contentContainerStyle={styles.contentContainer}>
32
           <View>
32
           <View>
33
-            <Button title="Toggle Top Bar Hide On Scroll" testID={testIDs.TOGGLE_TOP_BAR_HIDE_ON_SCROLL} onPress={this.onClickToggleTopBarHideOnScroll} />
33
+            <Button title='Toggle Top Bar Hide On Scroll' testID={testIDs.TOGGLE_TOP_BAR_HIDE_ON_SCROLL} onPress={this.onClickToggleTopBarHideOnScroll} />
34
           </View>
34
           </View>
35
         </ScrollView>
35
         </ScrollView>
36
       </View>
36
       </View>
63
     height: 1200
63
     height: 1200
64
   }
64
   }
65
 });
65
 });
66
-

+ 1
- 2
playground/src/screens/SideMenuScreen.js View File

14
       <View style={styles.root} testID={this.props.testID}>
14
       <View style={styles.root} testID={this.props.testID}>
15
         <Text testID={testIDs.SIDE_BAR}>Side Bar</Text>
15
         <Text testID={testIDs.SIDE_BAR}>Side Bar</Text>
16
         <Text style={styles.h1}>{`This is a ${this.props.side} side menu screen`}</Text>
16
         <Text style={styles.h1}>{`This is a ${this.props.side} side menu screen`}</Text>
17
-        <Button title="Hide Side Menu" testID={testID} onPress={() => this.hideSideMenu()} />
17
+        <Button title='Hide Side Menu' testID={testID} onPress={() => this.hideSideMenu()} />
18
       </View>
18
       </View>
19
     );
19
     );
20
   }
20
   }
39
     backgroundColor: '#f5fcff'
39
     backgroundColor: '#f5fcff'
40
   }
40
   }
41
 };
41
 };
42
-

+ 0
- 1
playground/src/screens/StaticLifecycleOverlay.js View File

11
       events: []
11
       events: []
12
     };
12
     };
13
     Navigation.events().componentLifecycle(({ event, componentName, componentId }) => {
13
     Navigation.events().componentLifecycle(({ event, componentName, componentId }) => {
14
-      console.log('guyca', `${event} ${componentName} [${componentId}]`);
15
       this.setState({
14
       this.setState({
16
         events: [...this.state.events, { event, componentName, componentId }]
15
         events: [...this.state.events, { event, componentName, componentId }]
17
       });
16
       });

+ 4
- 5
playground/src/screens/TextScreen.js View File

31
         <Button title={'Set Tab Badge'} testID={testIDs.SET_TAB_BADGE_BUTTON} onPress={() => this.onButtonPress()} />
31
         <Button title={'Set Tab Badge'} testID={testIDs.SET_TAB_BADGE_BUTTON} onPress={() => this.onButtonPress()} />
32
         <Button title={'Switch To Tab 2'} testID={testIDs.SWITCH_SECOND_TAB_BUTTON} onPress={() => this.onClickSwitchToTab()} />
32
         <Button title={'Switch To Tab 2'} testID={testIDs.SWITCH_SECOND_TAB_BUTTON} onPress={() => this.onClickSwitchToTab()} />
33
         <Button title={'Switch To Tab 1 by componentID'} testID={testIDs.SWITCH_FIRST_TAB_BUTTON} onPress={() => this.onClickSwitchToTabByComponentID()} />
33
         <Button title={'Switch To Tab 1 by componentID'} testID={testIDs.SWITCH_FIRST_TAB_BUTTON} onPress={() => this.onClickSwitchToTabByComponentID()} />
34
-        <Button title="Hide Tab Bar" testID={testIDs.HIDE_BOTTOM_TABS_BUTTON} onPress={() => this.hideTabBar(true)} />
35
-        <Button title="Show Tab Bar" testID={testIDs.SHOW_BOTTOM_TABS_BUTTON} onPress={() => this.hideTabBar(false)} />
36
-        <Button title="Show Left Side Menu" testID={testIDs.SHOW_LEFT_SIDE_MENU_BUTTON} onPress={() => this.showSideMenu('left')} />
37
-        <Button title="Show Right Side Menu" testID={testIDs.SHOW_RIGHT_SIDE_MENU_BUTTON} onPress={() => this.showSideMenu('right')} />
34
+        <Button title='Hide Tab Bar' testID={testIDs.HIDE_BOTTOM_TABS_BUTTON} onPress={() => this.hideTabBar(true)} />
35
+        <Button title='Show Tab Bar' testID={testIDs.SHOW_BOTTOM_TABS_BUTTON} onPress={() => this.hideTabBar(false)} />
36
+        <Button title='Show Left Side Menu' testID={testIDs.SHOW_LEFT_SIDE_MENU_BUTTON} onPress={() => this.showSideMenu('left')} />
37
+        <Button title='Show Right Side Menu' testID={testIDs.SHOW_RIGHT_SIDE_MENU_BUTTON} onPress={() => this.showSideMenu('right')} />
38
       </View>
38
       </View>
39
     );
39
     );
40
   }
40
   }
118
     marginTop: 10
118
     marginTop: 10
119
   }
119
   }
120
 };
120
 };
121
-

+ 1
- 1
playground/src/screens/TopTabOptionsScreen.js View File

25
       <View style={styles.root}>
25
       <View style={styles.root}>
26
         <Text style={styles.h1}>{this.props.text || 'Top Tab Screen'}</Text>
26
         <Text style={styles.h1}>{this.props.text || 'Top Tab Screen'}</Text>
27
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
27
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
28
-        <Button title="Dynamic Options" testID={testIDs.DYNAMIC_OPTIONS_BUTTON} onPress={this.onClickDynamicOptions} />
28
+        <Button title='Dynamic Options' testID={testIDs.DYNAMIC_OPTIONS_BUTTON} onPress={this.onClickDynamicOptions} />
29
       </View>
29
       </View>
30
     );
30
     );
31
   }
31
   }

+ 11
- 11
playground/src/screens/WelcomeScreen.js View File

30
     return (
30
     return (
31
       <View style={styles.root} key={'root'}>
31
       <View style={styles.root} key={'root'}>
32
         <Text testID={testIDs.WELCOME_SCREEN_HEADER} style={styles.h1}>{`React Native Navigation!`}</Text>
32
         <Text testID={testIDs.WELCOME_SCREEN_HEADER} style={styles.h1}>{`React Native Navigation!`}</Text>
33
-        <Button title="Switch to tab based app" testID={testIDs.TAB_BASED_APP_BUTTON} onPress={this.onClickSwitchToTabs} />
34
-        <Button title="Switch to app with side menus" testID={testIDs.TAB_BASED_APP_SIDE_BUTTON} onPress={this.onClickSwitchToSideMenus} />
35
-        <Button title="Push Lifecycle Screen" testID={testIDs.PUSH_LIFECYCLE_BUTTON} onPress={this.onClickLifecycleScreen} />
36
-        <Button title="Static Lifecycle Events" testID={testIDs.PUSH_STATIC_LIFECYCLE_BUTTON} onPress={this.onClickShowStaticLifecycleOverlay} />
37
-        <Button title="Push" testID={testIDs.PUSH_BUTTON} onPress={this.onClickPush} />
38
-        <Button title="Push Options Screen" testID={testIDs.PUSH_OPTIONS_BUTTON} onPress={this.onClickPushOptionsScreen} />
39
-        {Platform.OS === 'android' && <Button title="Push Top Tabs screen" testID={testIDs.PUSH_TOP_TABS_BUTTON} onPress={this.onClickPushTopTabsScreen} />}
40
-        {Platform.OS === 'android' && <Button title="Back Handler" testID={testIDs.BACK_HANDLER_BUTTON} onPress={this.onClickBackHandler} />}
41
-        <Button title="Show Modal" testID={testIDs.SHOW_MODAL_BUTTON} onPress={this.onClickShowModal} />
42
-        <Button title="Show Redbox" testID={testIDs.SHOW_REDBOX_BUTTON} onPress={this.onClickShowRedbox} />
43
-        <Button title="Orientation" testID={testIDs.ORIENTATION_BUTTON} onPress={this.onClickPushOrientationMenuScreen} />
33
+        <Button title='Switch to tab based app' testID={testIDs.TAB_BASED_APP_BUTTON} onPress={this.onClickSwitchToTabs} />
34
+        <Button title='Switch to app with side menus' testID={testIDs.TAB_BASED_APP_SIDE_BUTTON} onPress={this.onClickSwitchToSideMenus} />
35
+        <Button title='Push Lifecycle Screen' testID={testIDs.PUSH_LIFECYCLE_BUTTON} onPress={this.onClickLifecycleScreen} />
36
+        <Button title='Static Lifecycle Events' testID={testIDs.PUSH_STATIC_LIFECYCLE_BUTTON} onPress={this.onClickShowStaticLifecycleOverlay} />
37
+        <Button title='Push' testID={testIDs.PUSH_BUTTON} onPress={this.onClickPush} />
38
+        <Button title='Push Options Screen' testID={testIDs.PUSH_OPTIONS_BUTTON} onPress={this.onClickPushOptionsScreen} />
39
+        {Platform.OS === 'android' && <Button title='Push Top Tabs screen' testID={testIDs.PUSH_TOP_TABS_BUTTON} onPress={this.onClickPushTopTabsScreen} />}
40
+        {Platform.OS === 'android' && <Button title='Back Handler' testID={testIDs.BACK_HANDLER_BUTTON} onPress={this.onClickBackHandler} />}
41
+        <Button title='Show Modal' testID={testIDs.SHOW_MODAL_BUTTON} onPress={this.onClickShowModal} />
42
+        <Button title='Show Redbox' testID={testIDs.SHOW_REDBOX_BUTTON} onPress={this.onClickShowRedbox} />
43
+        <Button title='Orientation' testID={testIDs.ORIENTATION_BUTTON} onPress={this.onClickPushOrientationMenuScreen} />
44
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
44
         <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
45
       </View>
45
       </View>
46
     );
46
     );