parent
5af02d4017
commit
361038f2f2
@ -1,118 +1,13 @@
|
||||
import "../global.css";
|
||||
import { GluestackUIProvider } from "@/app/components/ui/gluestack-ui-provider";
|
||||
import HomeScreen from "@/app/HomeScreen";
|
||||
import ProfileScreen from "@/app/ProfileScreen";
|
||||
import {GluestackUIProvider} from "@/app/components/ui/gluestack-ui-provider";
|
||||
import React from "react";
|
||||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
||||
import {
|
||||
AntDesign,
|
||||
Entypo,
|
||||
MaterialCommunityIcons,
|
||||
MaterialIcons,
|
||||
} from "@expo/vector-icons";
|
||||
import NavBar from "@/app/components/NavBar";
|
||||
|
||||
export default function RootLayout() {
|
||||
const BottomTabNavigator = createBottomTabNavigator();
|
||||
return (
|
||||
<GluestackUIProvider>
|
||||
<BottomTabNavigator.Navigator
|
||||
initialRouteName="Home"
|
||||
screenOptions={{
|
||||
headerShown: false,
|
||||
tabBarShowLabel: false,
|
||||
tabBarStyle: {
|
||||
height: 75,
|
||||
backgroundColor: "#f9f9f9",
|
||||
},
|
||||
tabBarActiveTintColor: "black",
|
||||
tabBarInactiveTintColor: "#8e8e93",
|
||||
tabBarItemStyle: {
|
||||
borderRadius: 50,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<BottomTabNavigator.Screen
|
||||
name="Home"
|
||||
component={HomeScreen}
|
||||
options={{
|
||||
<NavBar/>
|
||||
|
||||
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<MaterialIcons
|
||||
name="home"
|
||||
color={focused ? "black" : color}
|
||||
size={focused ? size + 4 : size}
|
||||
/>
|
||||
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
<BottomTabNavigator.Screen
|
||||
name="Exercice"
|
||||
component={ProfileScreen}
|
||||
options={{
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<MaterialCommunityIcons
|
||||
name="dumbbell"
|
||||
size={focused ? size + 4 : size}
|
||||
color={focused ? "black" : color}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
<BottomTabNavigator.Screen
|
||||
name="Add"
|
||||
component={ProfileScreen}
|
||||
options={{
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<Entypo
|
||||
name="plus"
|
||||
size={focused ? size + 6 : size}
|
||||
color='white'
|
||||
/>
|
||||
),
|
||||
tabBarItemStyle: {
|
||||
borderRadius: 50,
|
||||
backgroundColor: "orange",
|
||||
},
|
||||
}}
|
||||
/>
|
||||
|
||||
<BottomTabNavigator.Screen
|
||||
name="Help"
|
||||
component={ProfileScreen}
|
||||
options={{
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<AntDesign
|
||||
name="question"
|
||||
size={focused ? size + 2 : size} // Augmente la taille si actif
|
||||
color={focused ? "black" : color}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
<BottomTabNavigator.Screen
|
||||
name="Settings"
|
||||
component={ProfileScreen}
|
||||
|
||||
options={{
|
||||
|
||||
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<MaterialIcons
|
||||
name="account-circle"
|
||||
size={focused ? size + 3 : size}
|
||||
color={focused ? "black" : color}
|
||||
/>
|
||||
|
||||
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</BottomTabNavigator.Navigator>
|
||||
</GluestackUIProvider>
|
||||
);
|
||||
}
|
||||
|
@ -0,0 +1,109 @@
|
||||
import HomeScreen from "@/app/HomeScreen";
|
||||
import {AntDesign, Entypo, MaterialCommunityIcons, MaterialIcons} from "@expo/vector-icons";
|
||||
import ProfileScreen from "@/app/ProfileScreen";
|
||||
import React from "react";
|
||||
import {createBottomTabNavigator} from "@react-navigation/bottom-tabs";
|
||||
|
||||
export default function NavBar() {
|
||||
const BottomTabNavigator = createBottomTabNavigator();
|
||||
return (
|
||||
<BottomTabNavigator.Navigator
|
||||
initialRouteName="Home"
|
||||
screenOptions={{
|
||||
headerShown: false,
|
||||
tabBarShowLabel: false,
|
||||
tabBarStyle: {
|
||||
height: 75,
|
||||
backgroundColor: "#f9f9f9",
|
||||
},
|
||||
tabBarActiveTintColor: "black",
|
||||
tabBarInactiveTintColor: "#8e8e93",
|
||||
tabBarItemStyle: {
|
||||
borderRadius: 50,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<BottomTabNavigator.Screen
|
||||
name="Home"
|
||||
component={HomeScreen}
|
||||
options={{
|
||||
|
||||
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<MaterialIcons
|
||||
name="home"
|
||||
color={focused ? "black" : color}
|
||||
size={focused ? size + 4 : size}
|
||||
/>
|
||||
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
<BottomTabNavigator.Screen
|
||||
name="Exercice"
|
||||
component={ProfileScreen}
|
||||
options={{
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<MaterialCommunityIcons
|
||||
name="dumbbell"
|
||||
size={focused ? size + 4 : size}
|
||||
color={focused ? "black" : color}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
<BottomTabNavigator.Screen
|
||||
name="Add"
|
||||
component={ProfileScreen}
|
||||
options={{
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<Entypo
|
||||
name="plus"
|
||||
size={focused ? size + 6 : size}
|
||||
color='white'
|
||||
/>
|
||||
),
|
||||
tabBarItemStyle: {
|
||||
borderRadius: 50,
|
||||
backgroundColor: "orange",
|
||||
},
|
||||
}}
|
||||
/>
|
||||
|
||||
<BottomTabNavigator.Screen
|
||||
name="Help"
|
||||
component={ProfileScreen}
|
||||
options={{
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<AntDesign
|
||||
name="question"
|
||||
size={focused ? size + 2 : size} // Augmente la taille si actif
|
||||
color={focused ? "black" : color}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
<BottomTabNavigator.Screen
|
||||
name="Settings"
|
||||
component={ProfileScreen}
|
||||
|
||||
options={{
|
||||
|
||||
|
||||
tabBarIcon: ({ color, size, focused }) => (
|
||||
<MaterialIcons
|
||||
name="account-circle"
|
||||
size={focused ? size + 3 : size}
|
||||
color={focused ? "black" : color}
|
||||
/>
|
||||
|
||||
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</BottomTabNavigator.Navigator>
|
||||
);
|
||||
}
|
Loading…
Reference in new issue