Moxitech-Websocket-Do/frontend/app/(tabs)/_layout.tsx
2024-09-01 19:43:58 +07:00

47 lines
1.2 KiB
TypeScript

import { Tabs } from 'expo-router';
import React from 'react';
import { TabBarIcon } from '@/components/navigation/TabBarIcon';
import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
export default function TabLayout() {
const colorScheme = useColorScheme();
return (
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
headerShown: false,
}}>
<Tabs.Screen
name="index"
options={{
title: 'Заметка',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'home' : 'home-outline'} color={color} />
),
}}
/>
<Tabs.Screen
name="groups"
options={{
title: 'Группы',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'grid' : 'grid-outline'} color={color} />
),
}}
/>
<Tabs.Screen
name="explore"
options={{
title: 'Настройки',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'code-slash' : 'code-slash-outline'} color={color} />
),
}}
/>
</Tabs>
);
}