-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathApp.js
More file actions
69 lines (66 loc) · 2.01 KB
/
App.js
File metadata and controls
69 lines (66 loc) · 2.01 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
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
import { StyleSheet } from "react-native";
import CartScreen from "./src/screens/CartScreen";
import HomeScreen from "./src/screens/HomeScreen";
import MenuScreen from "./src/screens/MenuScreen";
import ProfileScreen from "./src/screens/ProfileScreen";
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
const Tab = createBottomTabNavigator();
export default function App() {
return (
<NavigationContainer style={styles.container}>
<Tab.Navigator initialRouteName="menu"
screenOptions={{
tabBarShowLabel:false,
tabBarActiveTintColor:"#02c3d9",
}}
>
<Tab.Screen
name="home"
component={HomeScreen}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="home" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="profile"
component={ProfileScreen}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="account" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="cart"
component={CartScreen}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="cart-outline" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="menu"
component={MenuScreen}
options={{
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons name="menu" color={color} size={size} />
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
});