-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ios.js
141 lines (126 loc) · 2.95 KB
/
index.ios.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/* @flow */
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
Navigator,
ListView
} from 'react-native';
import { Root } from './JavaScript_Classes/Root';
import Icon from 'react-native-vector-icons/FontAwesome'
/*
var NavigationBarRouteMapper = {
LeftButton: function(route, navigator, index, navState) {
if (index === 0) {
return null;
}
var previousRoute = navState.routeStack[index - 1];
return (
<TouchableOpacity
onPress={() => navigator.pop()}
style={styles.navBarLeftButton}>
<Text style={[styles.navBarText, styles.navBarButtonText]}>
{previousRoute.title}
</Text>
</TouchableOpacity>
);
},
RightButton: function(route, navigator, index, navState) {
return (
<TouchableOpacity
onPress={() => navigator.push(newRandomRoute())}
style={styles.navBarRightButton}>
<Text style={[styles.navBarText, styles.navBarButtonText]}>
<Icon name='plus' size={30} color='white' />
</Text>
</TouchableOpacity>
);
},
Title: function(route, navigator, index, navState) {
return (
<Text style={[styles.navBarText, styles.navBarTitleText]}>
{route.title}
</Text>
);
},
}
*/
class EmployeeBook extends Component {
state: {
modalVisible:boolean
};
constructor(props) {
super(props);
}
render() {
return (
/*
<Navigator
ref='nav'
style = {styles.appContainer}
//barTintColor='green'
//style={styles.container}
//titleTextColor='#fff'
//tintColor='#fff'
initialRoute = {{
title: 'Employee Listing',
index: 0
}}
renderScene = {(route, navigator) =>
<EmployeesListing navigator = {navigator} title = {route.title} name = {route.title} />
}
configureScene={( route ) => {
if ( route.sceneConfig ) {
return route.sceneConfig;
}
return Navigator.SceneConfigs.FloatFromRight;
}
}
navigationBar = { <Navigator.NavigationBar routeMapper = {NavigationBarRouteMapper} style={styles.navBar}/>}
/>*/
<Root ref="current"/>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1
},
modalContainer: {
flex: 1,
backgroundColor: 'white',
justifyContent: 'center'
},
navBar: {
backgroundColor: 'green',
},
navBarText: {
fontSize: 16,
marginVertical: 10,
},
navBarTitleText: {
fontSize: 20,
color: 'white',
fontWeight: '500',
marginVertical: 9,
},
navBarLeftButton: {
paddingLeft: 10,
},
navBarRightButton: {
paddingRight: 10,
},
navBarButtonText: {
// color: '#5890FF',
color: 'white',
},
appContainer: {
flex: 1
}
});
// AppRegistry.registerComponent('EmployeeBook', () => EmployeeBook);
AppRegistry.registerComponent('EmployeeBook', () => Root);