|
@@ -8,6 +8,7 @@ class SimpleScreen extends Component {
|
8
|
8
|
super(props);
|
9
|
9
|
this.onClickPop = this.onClickPop.bind(this);
|
10
|
10
|
this.onClickPush = this.onClickPush.bind(this);
|
|
11
|
+ this.onClickShowModal = this.onClickShowModal.bind(this);
|
11
|
12
|
this.onClickDismissModal = this.onClickDismissModal.bind(this);
|
12
|
13
|
}
|
13
|
14
|
|
|
@@ -19,6 +20,7 @@ class SimpleScreen extends Component {
|
19
|
20
|
{this.renderTextFromFunctionInProps()}
|
20
|
21
|
<Button title="Push" onPress={this.onClickPush} />
|
21
|
22
|
<Button title="Pop" onPress={this.onClickPop} />
|
|
23
|
+ <Button title="Show Mddal" onPress={this.onClickPop} />
|
22
|
24
|
<Button title="Dismiss Modal" onPress={this.onClickDismissModal} />
|
23
|
25
|
</View>
|
24
|
26
|
);
|
|
@@ -45,6 +47,15 @@ class SimpleScreen extends Component {
|
45
|
47
|
}
|
46
|
48
|
});
|
47
|
49
|
}
|
|
50
|
+
|
|
51
|
+ onClickShowModal() {
|
|
52
|
+ Navigation.showModal({
|
|
53
|
+ name: 'navigation.playground.SimpleScreen',
|
|
54
|
+ passProps: {
|
|
55
|
+ text: 'Modal screen'
|
|
56
|
+ }
|
|
57
|
+ });
|
|
58
|
+ }
|
48
|
59
|
|
49
|
60
|
onClickDismissModal() {
|
50
|
61
|
Navigation.dismissModal(this.props.id);
|