-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
108 lines (96 loc) · 2.89 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { StatusBar } from 'expo-status-bar';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { TopNews } from './screens/TopNews';
import {Economics } from './screens/Economics';
import {Search } from './screens/Search';
import {Entertainment } from './screens/Entertainment';
import{Sport} from './screens/Sport';
import {Ionicons} from '@expo/vector-icons';
const Tab = createBottomTabNavigator();
export default function App() {
return (
<>
<StatusBar style="light" />
<NavigationContainer>
<Tab.Navigator initialRouteName="TopNews"
screenOptions={{
tabBarActiveTintColor: '#00f',
tabBarInactiveTintColor: '#001',
tabBarStyle: {
width: '85%',
justifyContent: 'center',
alignItems: 'center',
marginLeft: '3%',
marginVertical: 15,
marginHorizontal: '3%',
backgroundColor: '#ccb',
height: 60,
position: 'absolute',
bottom:16,
right: 16,
left: 16,
borderRadius: 18,
elevation:4,
shadowColor: '#000',
shadowOffset: {
width: 2,
height: 3,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
},
tabBarLabelStyle: {
fontSize: 12,
marginBottom: 5,
},
headerStyle: {backgroundColor: 'grey'},
headerTintColor: '#fff',
headerTitleStyle: {fontSize: 22,fontWeight: 'bold'},
}}
>
<Tab.Screen name="TopNews" component={TopNews}
options={{
title: 'Top News',
tabBarIcon: ({color, size}) => (
<Ionicons name="newspaper" color={color} size={size} />
),
}}
/>
<Tab.Screen name="Economics" component={Economics}
options={{
title: 'Economics',
tabBarIcon: ({color, size}) => (
<Ionicons name="cash" color={color} size={size} />
),
}}
/>
<Tab.Screen name="Search" component={Search}
options={{
title: 'Search',
tabBarIcon: ({color, size}) => (
<Ionicons name="search" color={color} size={size} />
),
}}
/>
<Tab.Screen name="Entertainment" component={Entertainment}
options={{
title: 'Entertainment',
tabBarIcon: ({color, size}) => (
<Ionicons name="book" color={color} size={size} />
),
}}
/>
<Tab.Screen name="Sport" component={Sport}
options={{
title: 'Sport',
tabBarIcon: ({color, size}) => (
<Ionicons name="football" color={color} size={size} />
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
</>
);
}