_layout.tsx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import React from 'react';
  2. import { Tabs } from 'expo-router';
  3. import { Platform } from 'react-native';
  4. import Svg, { Path } from 'react-native-svg';
  5. import {TabAccountIcon, TabChargingIcon, TabHomeIcon } from '../../../component/global/SVG';
  6. export default function TabLayout() {
  7. return (
  8. <Tabs
  9. screenOptions={{
  10. headerShown: false,
  11. tabBarLabelStyle: {
  12. fontSize: 16,
  13. marginBottom: Platform.OS === 'ios' ? 0 : 25
  14. },
  15. tabBarStyle: {
  16. height: 100
  17. }
  18. }}
  19. >
  20. <Tabs.Screen
  21. name="(home)"
  22. options={{
  23. title: '主頁',
  24. tabBarHideOnKeyboard: true,
  25. tabBarIcon: ({ focused }) => (
  26. <TabHomeIcon color={focused ? '#02677D' : '#BBBBBB'} />
  27. )
  28. }}
  29. />
  30. <Tabs.Screen
  31. name="(charging)/index"
  32. options={{
  33. title: '充電',
  34. tabBarHideOnKeyboard: true,
  35. tabBarIcon: ({ focused }) => (
  36. <TabChargingIcon color={focused ? '#02677D' : '#BBBBBB'} />
  37. )
  38. }}
  39. />
  40. <Tabs.Screen
  41. name="(account)/index"
  42. options={{
  43. title: '帳戶',
  44. tabBarHideOnKeyboard: true,
  45. tabBarIcon: ({ focused, color }) => (
  46. <TabAccountIcon color={focused ? '#02677D' : '#BBBBBB'} />
  47. )
  48. }}
  49. />
  50. </Tabs>
  51. );
  52. }