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>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
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={{
|
||||
@@ -12,9 +14,9 @@ export default function TabLayout() {
|
||||
tabBarStyle: {
|
||||
backgroundColor: Colors.white,
|
||||
borderTopColor: Colors.gray[200],
|
||||
paddingBottom: Spacing.sm,
|
||||
paddingBottom: insets.bottom,
|
||||
paddingTop: Spacing.sm,
|
||||
height: Spacing.xxxl + Spacing.xl + 1,
|
||||
height: Spacing.xxxl + Spacing.xl + 1 + insets.bottom,
|
||||
},
|
||||
tabBarLabelStyle: { fontWeight: FontWeight.medium },
|
||||
headerStyle: { backgroundColor: Colors.white },
|
||||
|
||||
Reference in New Issue
Block a user