2025-02-09 20:38:38 -05:00
|
|
|
// app/(tabs)/library/_layout.tsx
|
2025-02-15 14:03:42 -05:00
|
|
|
import { View } from 'react-native';
|
|
|
|
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
|
|
|
|
import ExercisesScreen from './exercises';
|
|
|
|
import TemplatesScreen from './templates';
|
|
|
|
import ProgramsScreen from './programs';
|
|
|
|
import Header from '@/components/Header';
|
|
|
|
import { useTheme } from '@react-navigation/native';
|
|
|
|
import type { CustomTheme } from '@/lib/theme';
|
|
|
|
import { TabScreen } from '@/components/layout/TabScreen';
|
|
|
|
|
|
|
|
const Tab = createMaterialTopTabNavigator();
|
|
|
|
|
|
|
|
export default function LibraryLayout() {
|
|
|
|
const theme = useTheme() as CustomTheme;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<TabScreen>
|
2025-02-27 20:24:04 -05:00
|
|
|
<Header useLogo={true} />
|
2025-02-15 14:03:42 -05:00
|
|
|
|
|
|
|
<Tab.Navigator
|
|
|
|
initialRouteName="templates"
|
|
|
|
screenOptions={{
|
|
|
|
tabBarActiveTintColor: theme.colors.tabIndicator,
|
|
|
|
tabBarInactiveTintColor: theme.colors.tabInactive,
|
|
|
|
tabBarLabelStyle: {
|
|
|
|
fontSize: 14,
|
|
|
|
textTransform: 'capitalize',
|
|
|
|
fontWeight: 'bold',
|
|
|
|
},
|
|
|
|
tabBarIndicatorStyle: {
|
|
|
|
backgroundColor: theme.colors.tabIndicator,
|
|
|
|
height: 2,
|
|
|
|
},
|
|
|
|
tabBarStyle: {
|
|
|
|
backgroundColor: theme.colors.background,
|
|
|
|
elevation: 0,
|
|
|
|
shadowOpacity: 0,
|
|
|
|
borderBottomWidth: 1,
|
|
|
|
borderBottomColor: theme.colors.border,
|
|
|
|
},
|
|
|
|
tabBarPressColor: theme.colors.primary,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Tab.Screen
|
|
|
|
name="exercises"
|
|
|
|
component={ExercisesScreen}
|
|
|
|
options={{ title: 'Exercises' }}
|
|
|
|
/>
|
|
|
|
<Tab.Screen
|
|
|
|
name="templates"
|
|
|
|
component={TemplatesScreen}
|
|
|
|
options={{ title: 'Templates' }}
|
|
|
|
/>
|
|
|
|
<Tab.Screen
|
|
|
|
name="programs"
|
|
|
|
component={ProgramsScreen}
|
|
|
|
options={{ title: 'Programs' }}
|
|
|
|
/>
|
|
|
|
</Tab.Navigator>
|
|
|
|
</TabScreen>
|
|
|
|
);
|
|
|
|
}
|