b6d4578862
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
69 lines
2.1 KiB
TypeScript
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: Math.max(insets.bottom - Spacing.md, Spacing.xs),
|
|
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>
|
|
);
|
|
}
|