|
@@ -1,8 +1,8 @@
|
1
|
1
|
const _ = require('lodash');
|
2
|
2
|
const React = require('react');
|
3
|
|
-const { Component } = require('react');
|
4
|
|
-const { View, Text, Platform } = require('react-native');
|
5
|
|
-const { Navigation } = require('react-native-navigation');
|
|
3
|
+const {Component} = require('react');
|
|
4
|
+const {View, Text, Platform} = require('react-native');
|
|
5
|
+const {Navigation} = require('react-native-navigation');
|
6
|
6
|
const Button = require('./Button');
|
7
|
7
|
const testIDs = require('../testIDs');
|
8
|
8
|
|
|
@@ -21,6 +21,7 @@ class PushedScreen extends Component {
|
21
|
21
|
testID: testIDs.TOP_BAR_BUTTON
|
22
|
22
|
},
|
23
|
23
|
rightButtonColor: 'red',
|
|
24
|
+ noBorder: true
|
24
|
25
|
},
|
25
|
26
|
bottomTabs: {
|
26
|
27
|
visible: false
|
|
@@ -40,7 +41,7 @@ class PushedScreen extends Component {
|
40
|
41
|
this.onClickPopToFirstPosition = this.onClickPopToFirstPosition.bind(this);
|
41
|
42
|
this.onClickPopToRoot = this.onClickPopToRoot.bind(this);
|
42
|
43
|
this.onClickSetStackRoot = this.onClickSetStackRoot.bind(this);
|
43
|
|
- this.state = { disabled: false };
|
|
44
|
+ this.state = {disabled: false};
|
44
|
45
|
}
|
45
|
46
|
|
46
|
47
|
simulateLongRunningTask() {
|
|
@@ -54,7 +55,7 @@ class PushedScreen extends Component {
|
54
|
55
|
this.listeners.push(
|
55
|
56
|
Navigation.events().registerComponentDidAppearListener((event) => {
|
56
|
57
|
if (this.state.previewComponentId === event.componentId) {
|
57
|
|
- this.setState({ disabled: event.type === 'ComponentDidAppear' });
|
|
58
|
+ this.setState({disabled: event.type === 'ComponentDidAppear'});
|
58
|
59
|
}
|
59
|
60
|
})
|
60
|
61
|
);
|
|
@@ -94,7 +95,7 @@ class PushedScreen extends Component {
|
94
|
95
|
);
|
95
|
96
|
}
|
96
|
97
|
|
97
|
|
- onClickShowPreview = async ({ reactTag }) => {
|
|
98
|
+ onClickShowPreview = async ({reactTag}) => {
|
98
|
99
|
await Navigation.push(this.props.componentId, {
|
99
|
100
|
component: {
|
100
|
101
|
name: 'navigation.playground.PushedScreen',
|