-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
60 lines (58 loc) · 1.92 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
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import {createStackNavigator} from '@react-navigation/stack';
import Dashboard from './screens/dashboard';
import Mycountry from './screens/mycountry';
import Precautions from './screens/precautions';
import Viewall from './screens/viewall';
const Tab = createBottomTabNavigator();
const Stack = createStackNavigator();
export default class App extends React.Component{
stackscreen = () => {
return(
<Stack.Navigator>
<Stack.Screen name="Dashboard" component={Dashboard} options={{headerTransparent:true,title:''}}/>
<Stack.Screen name="Viewall" component={Viewall} options={{title:'All Countries',headerTintColor:'#fff',headerStyle:{backgroundColor:'#3498DB',borderBottomLeftRadius:20,borderBottomRightRadius:20}}}/>
</Stack.Navigator>
);
}
render(){
return(
<NavigationContainer>
<Tab.Navigator tabBarOptions={{
activeTintColor: 'blue',
inactiveTintColor: 'gray',
style : {
borderRadius : 100,
marginHorizontal : 10,
bottom : 10,
backgroundColor : '#f2f2f2',
},
tabStyle : {
borderRadius : 100,
},
labelStyle : {
fontSize : 17,
textAlign:'center',
marginBottom : 15
},
}}>
<Tab.Screen name="Dashboard" component={this.stackscreen}
options={{
tabBarLabel : 'Dashboard'
}}
/>
<Tab.Screen name="My Country" component={Mycountry}
options={{
tabBarLabel : 'My Country'
}}/>
<Tab.Screen name="Precautions" component={Precautions}
options={{
tabBarLabel : 'Precautions'
}}/>
</Tab.Navigator>
</NavigationContainer>
);
}
}