_layout.tsx 968 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { Tabs } from 'expo-router';
  2. import React from 'react';
  3. import { HapticTab } from '@/components/haptic-tab';
  4. import { IconSymbol } from '@/components/ui/icon-symbol';
  5. import { Colors } from '@/constants/theme';
  6. import { useColorScheme } from '@/hooks/use-color-scheme';
  7. export default function TabLayout() {
  8. const colorScheme = useColorScheme();
  9. return (
  10. <Tabs
  11. screenOptions={{
  12. tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
  13. headerShown: false,
  14. tabBarButton: HapticTab,
  15. }}>
  16. <Tabs.Screen
  17. name="index"
  18. options={{
  19. title: 'Home',
  20. tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
  21. }}
  22. />
  23. <Tabs.Screen
  24. name="explore"
  25. options={{
  26. title: 'Explore',
  27. tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
  28. }}
  29. />
  30. </Tabs>
  31. );
  32. }