-
Notifications
You must be signed in to change notification settings - Fork 2
/
ReactStart.js
executable file
·61 lines (53 loc) · 1.69 KB
/
ReactStart.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import React, {
Component,
AppRegistry,
Navigator,
StyleSheet,
Text,
View,
} from 'react-native'
import Launch from './components/Launch'
import BottomView from './components/BottomView'
import Error from './components/Error'
import TabView from './components/TabView'
import TabView2 from './components/TabView2'
import Fabric from 'react-native-fabric'
const {
Router,
Route,
Schema,
Animations,
TabBar,
} = require('react-native-router-flux')
export default class TabIcon extends Component {
render(){
return (
<Text>{this.props.title}</Text>
)
}
}
export default class Example extends Component {
render() {
return (
<Router showNavigationBar={false} >
<Schema name="modal" sceneConfig={Navigator.SceneConfigs.FloatFromBottom}/>
<Schema name="default" sceneConfig={Navigator.SceneConfigs.FloatFromRight}/>
<Schema name="withoutAnimation"/>
<Schema name="tab" type="switch" icon={TabIcon} />
<Route name="BottomView" schema="modal">
<Router name="BottomViewRouter">
<Route name="BottomViewModal" component={BottomView} title="BottomView" schema="modal"/>
</Router>
</Route>
<Route name="tabbar">
<Router footer={TabBar} showNavigationBar={true}>
<Route name="tab1" schema="tab" title="Tab #1" component={TabView2} />
<Route name="tab2" schema="tab" title="Tab #2" component={TabView2} />
<Route name="tab3" schema="tab" title="Tab #3" component={TabView2} />
</Router>
</Route>
<Route name="launch" component={Launch} wrapRouter={true} title="Launch" initial={true}/>
</Router>
)
}
}