-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
89 lines (84 loc) · 2.01 KB
/
App.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
import React, {Component} from 'react';
import {
View,
StyleSheet,
StatusBar,
Image,
} from 'react-native';
import Home from './Home.js';
import Resources from './Resources';
import Events from './Events';
import { createAppContainer } from 'react-navigation';
import { createMaterialTopTabNavigator } from 'react-navigation-tabs';
const TabApp = createAppContainer(createMaterialTopTabNavigator(
{
Home: {
screen: Home,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
<Image
style = {{width: 20, height: 30}}
source = {{uri: "https://cdn1.iconfinder.com/data/icons/navigation-7/32/house-01-512.png"}}
/>
),
}
},
Resources: {
screen: Resources,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
<Image
style = {{width: 20, height: 30}}
source = {{uri: "https://cdn4.iconfinder.com/data/icons/basics-set-2/100/Question-512.png"}}
/>
)
}
},
Events: {
screen: Events,
navigationOptions: {
tabBarIcon: ({ tintColor }) => (
<Image
style = {{width: 20, height: 30}}
source = {{uri: "https://cdn4.iconfinder.com/data/icons/date-and-time-3/32/495-01-512.png"}}
/>
)
}
},
},
{
initialRouteName: 'Home',
tabBarPosition: 'bottom',
lazy: true,
tabBarOptions: {
showIcon: true,
showLabel: false,
style: {
backgroundColor: 'white',
}
}
}
));
// export default TabApp
export default class App extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return(
<View style={styles.container}>
<StatusBar translucent barStyle="dark-content" backgroundColor="transparent" />
<TabApp />
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
// backgroundColor: '#f8f9fa',
// alignItems: 'center',
justifyContent: 'center'
}
});