Files
cesizen-individuel/mobile/app/(tabs)/_layout.tsx
T
Azmog 925f56a649 fix(mobile): respecte les safe areas (Dynamic Island + indicateur home)
- AppBar : marge haute = inset top (plus de chevauchement avec l'heure/Dynamic Island)
- barre d'onglets : hauteur/marge basse = inset bottom (plus collée au bord)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 15:38:16 +02:00

69 lines
2.1 KiB
TypeScript

import { Tabs } from 'expo-router';
import { Ionicons } from '@expo/vector-icons';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { Colors } from '@/lib/colors';
import { FontWeight, Spacing } from '@/lib/theme';
export default function TabLayout() {
const insets = useSafeAreaInsets();
return (
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors.primary,
tabBarInactiveTintColor: Colors.gray[400],
tabBarStyle: {
backgroundColor: Colors.white,
borderTopColor: Colors.gray[200],
paddingBottom: insets.bottom,
paddingTop: Spacing.sm,
height: Spacing.xxxl + Spacing.xl + 1 + insets.bottom,
},
tabBarLabelStyle: { fontWeight: FontWeight.medium },
headerStyle: { backgroundColor: Colors.white },
headerTitleStyle: { fontWeight: FontWeight.bold, color: Colors.black },
}}
>
<Tabs.Screen
name="index"
options={{
title: 'Accueil',
headerShown: false,
tabBarIcon: ({ color, size }) => <Ionicons name="home" size={size} color={color} />,
}}
/>
<Tabs.Screen
name="journal"
options={{
title: 'Journal',
headerShown: false,
tabBarIcon: ({ color, size }) => <Ionicons name="book" size={size} color={color} />,
}}
/>
<Tabs.Screen
name="info"
options={{
title: 'Infos',
headerShown: false,
tabBarIcon: ({ color, size }) => <Ionicons name="information-circle" size={size} color={color} />,
}}
/>
<Tabs.Screen
name="urgence"
options={{
title: 'Urgence',
headerShown: false,
tabBarIcon: ({ color, size }) => <Ionicons name="call" size={size} color={color} />,
}}
/>
<Tabs.Screen
name="profile"
options={{
title: 'Profil',
headerShown: false,
tabBarIcon: ({ color, size }) => <Ionicons name="person" size={size} color={color} />,
}}
/>
</Tabs>
);
}