feat: setup bottom tab navigation and base screens

This commit is contained in:
imsophis
2026-05-22 19:46:23 -06:00
parent 44cfca0eeb
commit 2bb271712b
4 changed files with 70 additions and 21 deletions

View File

@@ -11,12 +11,45 @@ export default function Layout() {
tabBarInactiveTintColor: "#9CA3AF",
tabBarStyle: {
height: 70,
paddingBottom: 10,
paddingTop: 10,
position: "absolute",
bottom: 5,
left: 20,
right: 20,
height: 82,
borderRadius: 25,
backgroundColor: "#FFFFFF",
borderTopWidth: 0,
elevation: 8,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 10,
},
shadowOpacity: 0.08,
shadowRadius: 10,
elevation: 10,
paddingHorizontal: 10,
},
tabBarLabelStyle: {
fontSize: 11,
fontWeight: "400",
marginBottom: 8,
},
tabBarItemStyle: {
paddingTop: 6,
paddingBottom: 4,
borderRadius: 18,
marginVertical: 6,
marginHorizontal: 4,
},
}}
>
@@ -24,8 +57,12 @@ export default function Layout() {
name="index"
options={{
title: "Inicio",
tabBarIcon: ({ color, size }) => (
<Ionicons name="home-outline" size={size} color={color} />
tabBarIcon: ({ focused, color }) => (
<Ionicons
name={focused ? "home" : "home-outline"}
size={focused ? 28 : 24}
color={color}
/>
),
}}
/>
@@ -34,8 +71,12 @@ export default function Layout() {
name="alerts"
options={{
title: "Alertas",
tabBarIcon: ({ color, size }) => (
<Ionicons name="notifications-outline" size={size} color={color} />
tabBarIcon: ({ focused, color }) => (
<Ionicons
name={focused ? "notifications" : "notifications-outline"}
size={focused ? 28 : 24}
color={color}
/>
),
}}
/>
@@ -44,8 +85,12 @@ export default function Layout() {
name="guide"
options={{
title: "Guía",
tabBarIcon: ({ color, size }) => (
<Ionicons name="leaf-outline" size={size} color={color} />
tabBarIcon: ({ focused, color }) => (
<Ionicons
name={focused ? "leaf" : "leaf-outline"}
size={focused ? 28 : 24}
color={color}
/>
),
}}
/>
@@ -54,8 +99,12 @@ export default function Layout() {
name="profile"
options={{
title: "Perfil",
tabBarIcon: ({ color, size }) => (
<Ionicons name="person-outline" size={size} color={color} />
tabBarIcon: ({ focused, color }) => (
<Ionicons
name={focused ? "person" : "person-outline"}
size={focused ? 28 : 24}
color={color}
/>
),
}}
/>

View File

@@ -8,7 +8,7 @@ export default function GuideScreen() {
justifyContent: "center",
alignItems: "center",
}}
>
>
<Text>Guía</Text>
</View>
);

View File

@@ -12,4 +12,4 @@ export default function HomeScreen() {
<Text>Inicio</Text>
</View>
);
}
}

View File

@@ -4,12 +4,12 @@ export default function ProfileScreen() {
return (
<View
style={{
flex: 1,
justifyContent: "center",
alignItems: "center",
}}
>
<Text>Perfil</Text>
flex: 1,
justifyContent: "center",
alignItems: "center",
}}
>
<Text>Perfil</Text>
</View>
);
}
}