-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
86 lines (80 loc) · 2.14 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
import React from 'react';
import { StyleSheet, View, Dimensions, StatusBar, Platform } from 'react-native';
import { createStackNavigator, createBottomTabNavigator } from 'react-navigation'
import NewsCard from './component/NewsCard'
import Home from './component/Home'
import WebSearch from './component/WebSearch'
import MenuNews from './component/MenuNews'
import SearchNewsCard from './component/SearchNewsCard'
import { Constants } from 'expo'
import { Ionicons } from '@expo/vector-icons'
function AppStatusBar({ backgroundColor, ...props }) {
return (
<View style = {{ backgroundColor, height: Constants.statusBarHeight }}>
<StatusBar translucent backgroundColor = { backgroundColor } {...props }/>
</View >
)
}
const Tabs = createBottomTabNavigator({
NewsCard: {
screen: NewsCard,
navigationOptions: {
tabBarIcon: () => (
<Ionicons name = "ios-card-outline"
size = { 24 }
color = '#4BA5F9'
/>
)
}
},
HOME: {
screen: Home,
navigationOptions: {
tabBarIcon: () => (
<Ionicons name = "ios-home"
size = { 24 }
color = '#4BA5F9'
/>
)
}
},
}, {
navigationOptions: {
tabBarVisible: true,
swipeEnabled: true,
header: null
}
});
const MainNavigation = createStackNavigator({
Home: {
screen: Tabs,
navigationOptions: {
header: null
}
},
WebSearch: {
screen: WebSearch,
},
MenuNews: {
screen: MenuNews,
navigationOptions: {
header: null
}
},
SearchNewsCard: {
screen: SearchNewsCard,
navigationOptions: {
header: null
}
}
}, )
export default class App extends React.Component {
render() {
return (
<View style = {{ flex: 1 } }>
<AppStatusBar backgroundColor = "black" barStyle = "light-content" />
<MainNavigation />
</View>
);
}
}