eletrotupi / tcc/ frontend/app/(tabs)/_layout.tsxf09fe617432639e002945e9e663a4f8e354a39c5
973 B | 35 lines Raw
1
import { Tabs } from 'expo-router';
2
import React from 'react';
3

4
import { HapticTab } from '@/components/misc/haptic-tab';
5
import { IconSymbol } from '@/components/ui/icon-symbol';
6
import { Colors } from '@/constants/theme';
7
import { useColorScheme } from '@/hooks/use-color-scheme';
8

9
export default function TabLayout() {
10
  const colorScheme = useColorScheme();
11

12
  return (
13
    <Tabs
14
      screenOptions={{
15
        tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
16
        headerShown: false,
17
        tabBarButton: HapticTab,
18
      }}>
19
      <Tabs.Screen
20
        name="index"
21
        options={{
22
          title: 'Home',
23
          tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
24
        }}
25
      />
26
      <Tabs.Screen
27
        name="explore"
28
        options={{
29
          title: 'Explore',
30
          tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
31
        }}
32
      />
33
    </Tabs>
34
  );
35
}