forked from mushrifahamed/ProIntern
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabNavigator.js
More file actions
38 lines (33 loc) · 1.28 KB
/
TabNavigator.js
File metadata and controls
38 lines (33 loc) · 1.28 KB
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
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import Home_Recruit from "./screens/Recruit/Home_Recruit";
import Intern_Recruit from "./screens/Recruit/Intern_Recruit";
import Profile_Recruit from "./screens/Recruit/Profile_Recruit";
import { Ionicons } from "@expo/vector-icons";
const Tab = createBottomTabNavigator();
const TabNavigator = () => {
return (
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName;
if (route.name === "Home") {
iconName = focused ? "home" : "home-outline";
} else if (route.name === "Intern") {
iconName = focused ? "briefcase" : "briefcase-outline";
} else if (route.name === "Profile") {
iconName = focused ? "person" : "person-outline";
}
return <Ionicons name={iconName} size={size} color={color} />;
},
tabBarActiveTintColor: "tomato",
tabBarInactiveTintColor: "gray",
})}
>
<Tab.Screen name="Home" component={Home_Recruit} />
<Tab.Screen name="Intern" component={Intern_Recruit} />
<Tab.Screen name="Profile" component={Profile_Recruit} />
</Tab.Navigator>
);
};
export default TabNavigator;