-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
45 lines (42 loc) · 1.34 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
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import Users, { USERS_SCREEN } from "./screens/Users";
import Todo, { TODO_SCREEN } from "./screens/Todo";
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
const Tab = createBottomTabNavigator();
function App() {
return (
<NavigationContainer>
<Tab.Navigator
screenOptions={{
tabBarActiveTintColor: "#074C0E",
tabBarInactiveTintColor: "gray",
}}
>
<Tab.Screen
component={Todo}
name={TODO_SCREEN.name}
options={{
tabBarLabel: "To Do",
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="home" color={color} size={30} />
),
}}
/>
{/* here it is navigating to users component wich is navigatin to users details */}
<Tab.Screen
component={Users}
name={USERS_SCREEN.name}
options={{
tabBarLabel: "Users",
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="account" color={color} size={30} />
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
);
}
export default App;