|
@@ -9,11 +9,11 @@ const {
|
9
|
9
|
EXTERNAL_COMP_BTN,
|
10
|
10
|
SHOW_STATIC_EVENTS_SCREEN,
|
11
|
11
|
SHOW_ORIENTATION_SCREEN,
|
12
|
|
- TOP_BAR_ELEMENT
|
|
12
|
+ SET_ROOT_BTN
|
13
|
13
|
} = require('../testIDs');
|
14
|
14
|
const Screens = require('./Screens');
|
15
|
15
|
|
16
|
|
-class NavigationScreen extends React.Component {
|
|
16
|
+class NavigationScreen extends React.Component {
|
17
|
17
|
static options() {
|
18
|
18
|
return {
|
19
|
19
|
topBar: {
|
|
@@ -32,6 +32,7 @@ class NavigationScreen extends React.Component {
|
32
|
32
|
render() {
|
33
|
33
|
return (
|
34
|
34
|
<Root componentId={this.props.componentId}>
|
|
35
|
+ <Button label='Set Root' testID={SET_ROOT_BTN} onPress={this.setRoot} />
|
35
|
36
|
<Button label='Modal' testID={MODAL_BTN} onPress={this.showModal} />
|
36
|
37
|
<Button label='Overlay' testID={OVERLAY_BTN} onPress={this.showOverlay} />
|
37
|
38
|
<Button label='External Component' testID={EXTERNAL_COMP_BTN} onPress={this.externalComponent} />
|
|
@@ -45,12 +46,13 @@ class NavigationScreen extends React.Component {
|
45
|
46
|
);
|
46
|
47
|
}
|
47
|
48
|
|
|
49
|
+ setRoot = () => Navigation.showModal(Screens.SetRoot);
|
48
|
50
|
showModal = () => Navigation.showModal(Screens.Modal);
|
49
|
51
|
showOverlay = () => Navigation.showModal(Screens.Overlay);
|
50
|
52
|
externalComponent = () => Navigation.showModal(Screens.ExternalComponent);
|
51
|
53
|
pushStaticEventsScreen = () => Navigation.showModal(Screens.EventsScreen)
|
52
|
54
|
orientation = () => Navigation.showModal(Screens.Orientation);
|
53
|
|
- preview = ({ reactTag }) => {
|
|
55
|
+ preview = ({reactTag}) => {
|
54
|
56
|
Navigation.push(this.props.componentId, {
|
55
|
57
|
component: {
|
56
|
58
|
name: Screens.Pushed,
|