You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
3 years ago
|
import React from "react";
|
||
|
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
||
|
import Home from "../src/screens/Home";
|
||
|
import ShoppingCart from '../src/screens/ShoppingCart';
|
||
|
import Products from "../src/screens/Products";
|
||
|
import { Entypo, FontAwesome } from "@expo/vector-icons";
|
||
|
|
||
|
const Tab = createBottomTabNavigator();
|
||
|
|
||
|
const BottomTabNavigator = () => {
|
||
|
return (
|
||
|
<Tab.Navigator
|
||
|
initialRouteName="Home"
|
||
|
screenOptions={{
|
||
|
headerShown: false,
|
||
|
tabBarActiveTintColor: "white",
|
||
|
tabBarInactiveTintColor: "grey",
|
||
|
tabBarStyle: {
|
||
|
backgroundColor: "#181818",
|
||
|
},
|
||
|
}}
|
||
|
>
|
||
|
<Tab.Screen
|
||
|
name="Home"
|
||
|
component={Home}
|
||
|
options={{
|
||
|
tabBarIcon: ({ focused, color }) => (
|
||
|
<Entypo name="home" size={focused ? 30 : 25} color={color} />
|
||
|
),
|
||
|
}}
|
||
|
/>
|
||
|
<Tab.Screen
|
||
|
name="Products"
|
||
|
component={Products}
|
||
|
options={{
|
||
|
tabBarIcon: ({ focused, color }) => (
|
||
|
<Entypo name="shop" size={focused ? 30 : 25} color={color} />
|
||
|
),
|
||
|
}}
|
||
|
/>
|
||
|
<Tab.Screen
|
||
|
name="ShoppingCart"
|
||
|
component={ShoppingCart}
|
||
|
options={{
|
||
|
tabBarIcon: ({ focused, color }) => (
|
||
|
<FontAwesome name="shopping-cart" size={focused ? 30 : 25} color={color} />
|
||
|
),
|
||
|
}}
|
||
|
/>
|
||
|
</Tab.Navigator>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default BottomTabNavigator;
|