_layout.tsx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import React from 'react';
  2. import FontAwesome from '@expo/vector-icons/FontAwesome';
  3. import { Tabs } from 'expo-router';
  4. export default function TabLayout() {
  5. return (
  6. <Tabs screenOptions={{ tabBarActiveTintColor: 'blue' }}>
  7. <Tabs.Screen
  8. name="index"
  9. options={{
  10. title: 'Home',
  11. tabBarIcon: ({ color }) => (
  12. <FontAwesome size={28} name="home" color={color} />
  13. )
  14. }}
  15. />
  16. <Tabs.Screen
  17. name="settings/index"
  18. options={{
  19. title: 'Settings',
  20. tabBarIcon: ({ color }) => (
  21. <FontAwesome size={28} name="cog" color={color} />
  22. )
  23. }}
  24. />
  25. <Tabs.Screen
  26. name="search/index"
  27. options={{
  28. title: 'Search',
  29. tabBarIcon: ({ color }) => (
  30. <FontAwesome size={28} name="search" color={color} />
  31. )
  32. }}
  33. />
  34. <Tabs.Screen
  35. name="testing/index"
  36. options={{
  37. title: 'Test Component',
  38. tabBarIcon: ({ color }) => (
  39. <FontAwesome size={28} name="hashtag" color={color} />
  40. )
  41. }}
  42. />
  43. </Tabs>
  44. );
  45. }