diff options
| author | Anita <ana.tqtc@gmail.com> | 2026-04-04 20:52:35 +0100 |
|---|---|---|
| committer | Anita <ana.tqtc@gmail.com> | 2026-04-04 20:52:35 +0100 |
| commit | cf8afc1ee12a51251a4795d1be6414f640f9e494 (patch) | |
| tree | d942d35bb7a248e7b8de563f3a053eebe4cc8027 /src/app/(protected)/(tabs)/_layout.tsx | |
| parent | c4d40229201f4bc7221a90d3d458787333786131 (diff) | |
feat: menuBar, perfil y home rediseñados y sistema de estilos global creado
Diffstat (limited to 'src/app/(protected)/(tabs)/_layout.tsx')
| -rw-r--r-- | src/app/(protected)/(tabs)/_layout.tsx | 69 |
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> ); |