|
@@ -5,7 +5,7 @@ const { View, Text, Button, Platform } = require('react-native');
|
5
|
5
|
|
6
|
6
|
const { Navigation } = require('react-native-navigation');
|
7
|
7
|
const testIDs = require('../testIDs');
|
8
|
|
-
|
|
8
|
+const Bounds = require('../components/Bounds');
|
9
|
9
|
class TextScreen extends Component {
|
10
|
10
|
static get options() {
|
11
|
11
|
return {
|
|
@@ -21,22 +21,24 @@ class TextScreen extends Component {
|
21
|
21
|
|
22
|
22
|
render() {
|
23
|
23
|
return (
|
24
|
|
- <View style={styles.root}>
|
25
|
|
- <Text style={styles.h1} testID={testIDs.CENTERED_TEXT_HEADER}>{this.props.text || 'Text Screen'}</Text>
|
26
|
|
- {this.renderTextFromFunctionInProps()}
|
27
|
|
- <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
|
28
|
|
- <Button title={'Set Tab Badge'} testID={testIDs.SET_TAB_BADGE_BUTTON} onPress={() => this.onClickSetBadge()} />
|
29
|
|
- <Button title={'Switch To Tab 2'} testID={testIDs.SWITCH_SECOND_TAB_BUTTON} onPress={() => this.onClickSwitchToTab()} />
|
30
|
|
- <Button title={'Switch To Tab 1 by componentID'} testID={testIDs.SWITCH_FIRST_TAB_BUTTON} onPress={() => this.onClickSwitchToTabByComponentID()} />
|
31
|
|
- {/* tslint:disable-next-line:max-line-length */}
|
32
|
|
- { Platform.OS === 'android' && <Button title='Hide Tab Bar' testID={testIDs.HIDE_BOTTOM_TABS_BUTTON} onPress={() => this.toggleTabBarVisibility(this.props.componentId, false)} /> }
|
33
|
|
- { Platform.OS === 'android' && <Button title='Show Tab Bar' testID={testIDs.SHOW_BOTTOM_TABS_BUTTON} onPress={() => this.toggleTabBarVisibility('BottomTabs', true)} /> }
|
34
|
|
- <Button title='Hide Tab Bar on Push' testID={testIDs.HIDE_BOTTOM_TABS_ON_PUSH_BUTTON} onPress={() => this.hideTabBarOnPush()} />
|
35
|
|
- <Button title='Show Left Side Menu' testID={testIDs.SHOW_LEFT_SIDE_MENU_BUTTON} onPress={() => this.showSideMenu('left')} />
|
36
|
|
- <Button title='Show Right Side Menu' testID={testIDs.SHOW_RIGHT_SIDE_MENU_BUTTON} onPress={() => this.showSideMenu('right')} />
|
37
|
|
- <Button title='Push' testID={testIDs.PUSH_BUTTON} onPress={this.onClickPush} />
|
38
|
|
- <Button title='Pop' testID={testIDs.POP_BUTTON} onPress={this.onClickPop} />
|
39
|
|
- </View>
|
|
24
|
+ <Bounds>
|
|
25
|
+ <View style={styles.root}>
|
|
26
|
+ <Text style={styles.h1} testID={testIDs.CENTERED_TEXT_HEADER}>{this.props.text || 'Text Screen'}</Text>
|
|
27
|
+ {this.renderTextFromFunctionInProps()}
|
|
28
|
+ <Text style={styles.footer}>{`this.props.componentId = ${this.props.componentId}`}</Text>
|
|
29
|
+ <Button title={'Set Tab Badge'} testID={testIDs.SET_TAB_BADGE_BUTTON} onPress={() => this.onClickSetBadge()} />
|
|
30
|
+ <Button title={'Switch To Tab 2'} testID={testIDs.SWITCH_SECOND_TAB_BUTTON} onPress={() => this.onClickSwitchToTab()} />
|
|
31
|
+ <Button title={'Switch To Tab 1 by componentID'} testID={testIDs.SWITCH_FIRST_TAB_BUTTON} onPress={() => this.onClickSwitchToTabByComponentID()} />
|
|
32
|
+ {/* tslint:disable-next-line:max-line-length */}
|
|
33
|
+ { Platform.OS === 'android' && <Button title='Hide Tab Bar' testID={testIDs.HIDE_BOTTOM_TABS_BUTTON} onPress={() => this.toggleTabBarVisibility(this.props.componentId, false)} /> }
|
|
34
|
+ { Platform.OS === 'android' && <Button title='Show Tab Bar' testID={testIDs.SHOW_BOTTOM_TABS_BUTTON} onPress={() => this.toggleTabBarVisibility('BottomTabs', true)} /> }
|
|
35
|
+ <Button title='Hide Tab Bar on Push' testID={testIDs.HIDE_BOTTOM_TABS_ON_PUSH_BUTTON} onPress={() => this.hideTabBarOnPush()} />
|
|
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
|
+ <Button title='Push' testID={testIDs.PUSH_BUTTON} onPress={this.onClickPush} />
|
|
39
|
+ <Button title='Pop' testID={testIDs.POP_BUTTON} onPress={this.onClickPop} />
|
|
40
|
+ </View>
|
|
41
|
+ </Bounds>
|
40
|
42
|
);
|
41
|
43
|
}
|
42
|
44
|
|