this repo has no description
at main 1.3 kB view raw
1import { Tabs } from 'expo-router'; 2import React from 'react'; 3import { Platform } from 'react-native'; 4 5import { HapticTab } from '@/components/HapticTab'; 6import { IconSymbol } from '@/components/ui/IconSymbol'; 7import TabBarBackground from '@/components/ui/TabBarBackground'; 8import { Colors } from '@/constants/Colors'; 9import { useColorScheme } from '@/hooks/useColorScheme'; 10 11export default function TabLayout() { 12 const colorScheme = useColorScheme(); 13 14 return ( 15 <Tabs 16 screenOptions={{ 17 tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint, 18 headerShown: false, 19 tabBarButton: HapticTab, 20 tabBarBackground: TabBarBackground, 21 tabBarStyle: Platform.select({ 22 ios: { 23 // Use a transparent background on iOS to show the blur effect 24 position: 'absolute', 25 }, 26 default: {}, 27 }), 28 }}> 29 <Tabs.Screen 30 name="index" 31 options={{ 32 title: 'Home', 33 tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />, 34 }} 35 /> 36 <Tabs.Screen 37 name="explore" 38 options={{ 39 title: 'Explore', 40 tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />, 41 }} 42 /> 43 </Tabs> 44 ); 45}