summaryrefslogtreecommitdiffstats
path: root/src/app/(protected)/(tabs)/_layout.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/(protected)/(tabs)/_layout.tsx')
-rw-r--r--src/app/(protected)/(tabs)/_layout.tsx69
1 files changed, 61 insertions, 8 deletions
diff --git a/src/app/(protected)/(tabs)/_layout.tsx b/src/app/(protected)/(tabs)/_layout.tsx
index 0b71c6d..a4e0445 100644
--- a/src/app/(protected)/(tabs)/_layout.tsx
+++ b/src/app/(protected)/(tabs)/_layout.tsx
@@ -1,23 +1,76 @@
import { Tabs } from 'expo-router';
+import { Feather } from '@expo/vector-icons';
+import { MaterialIcons } from '@expo/vector-icons';
+import theme from '@/theme';
+
+// accesos cortos al theme de estilos
+const { colors, typography, fontWeight, layout } = theme;
export default function TabsLayout() {
return (
- <Tabs screenOptions={{ headerShown: false }}>
+ <Tabs
+ screenOptions={{
+ headerShown: false,
+ tabBarActiveTintColor: colors.primary,
+ tabBarInactiveTintColor: colors.textSecondary,
+ tabBarLabelStyle: {
+ fontSize: typography.sm,
+ fontWeight: fontWeight.regular,
+ },
+ tabBarStyle: {
+ height: layout.tabBarHeight,
+ paddingBottom: 2,
+ paddingTop: 6,
+ // ancho acotado igual que el container del home
+ width: '100%',
+ maxWidth: layout.contentWidth,
+ alignSelf: 'center',
+ backgroundColor: colors.surface,
+ borderTopColor: colors.border,
+ },
+ }}
+ >
<Tabs.Screen
+ /* el nombre debe coincidir con la ruta para que expo router
+ lo detecte bien y muestre el tabBarLabel y en el orden declarado */
name="home"
- options={{ title: 'Inicio' }}
+ options={{
+ title: 'Inicio',
+ tabBarLabel: 'Inicio',
+ tabBarIcon: ({ color, size }) => (
+ <Feather name="home" size={size} color={color} />
+ ),
+ }}
/>
<Tabs.Screen
- name="offices"
- options={{ title: 'Espacios' }}
+ name="offices/index"
+ options={{
+ title: 'Espacios',
+ tabBarLabel: 'Espacios',
+ tabBarIcon: ({ color, size }) => (
+ <MaterialIcons name="apartment" size={size} color={color} />
+ ),
+ }}
/>
<Tabs.Screen
- name="reservations"
- options={{ title: 'Reservas' }}
+ name="reservations/index"
+ options={{
+ title: 'Reservas',
+ tabBarLabel: 'Reservas',
+ tabBarIcon: ({ color, size }) => (
+ <Feather name="calendar" size={size} color={color} />
+ ),
+ }}
/>
<Tabs.Screen
- name="profile"
- options={{ title: 'Perfil' }}
+ name="profile/index"
+ options={{
+ title: 'Perfil',
+ tabBarLabel: 'Perfil',
+ tabBarIcon: ({ color, size }) => (
+ <Feather name="user" size={size} color={color} />
+ ),
+ }}
/>
</Tabs>
);