Massive/AppDrawer.tsx

74 lines
2.1 KiB
TypeScript
Raw Normal View History

import { createDrawerNavigator } from "@react-navigation/drawer";
import { IconButton } from "react-native-paper";
import GraphsList from "./GraphsList";
import InsightsPage from "./InsightsPage";
import PlanList from "./PlanList";
import SetList from "./SetList";
import SettingsPage from "./SettingsPage";
import TimerPage from "./TimerPage";
import WeightList from "./WeightList";
import ExerciseList from "./ExerciseList";
import { DrawerParams } from "./drawer-param-list";
import useDark from "./use-dark";
2022-07-15 04:34:06 +00:00
const Drawer = createDrawerNavigator<DrawerParams>();
2022-09-25 04:49:26 +00:00
export default function AppDrawer() {
const dark = useDark();
2022-07-15 04:34:06 +00:00
return (
<Drawer.Navigator
screenOptions={{
headerTintColor: dark ? "white" : "black",
swipeEdgeWidth: 1000,
headerShown: false,
2023-06-27 03:16:59 +00:00
}}
>
2023-01-01 05:05:11 +00:00
<Drawer.Screen
name="Home"
component={SetList}
2023-10-26 05:49:56 +00:00
options={{ drawerIcon: () => <IconButton icon="home-outline" /> }}
2023-01-01 05:05:11 +00:00
/>
<Drawer.Screen
name="Exercises"
component={ExerciseList}
options={{ drawerIcon: () => <IconButton icon="dumbbell" /> }}
/>
2023-01-01 05:05:11 +00:00
<Drawer.Screen
name="Plans"
component={PlanList}
2023-10-26 05:49:56 +00:00
options={{ drawerIcon: () => <IconButton icon="calendar-outline" /> }}
2023-01-01 05:05:11 +00:00
/>
<Drawer.Screen
name="Graphs"
component={GraphsList}
2023-10-20 22:57:31 +00:00
options={{
drawerIcon: () => <IconButton icon="chart-bell-curve-cumulative" />,
}}
2023-01-01 05:05:11 +00:00
/>
<Drawer.Screen
name="Timer"
2023-01-01 05:05:11 +00:00
component={TimerPage}
2023-10-19 05:28:56 +00:00
options={{ drawerIcon: () => <IconButton icon="timer-outline" /> }}
/>
<Drawer.Screen
name="Weight"
component={WeightList}
2023-10-26 05:49:56 +00:00
options={{ drawerIcon: () => <IconButton icon="scale-bathroom" /> }}
2023-01-01 05:05:11 +00:00
/>
2023-10-24 08:32:31 +00:00
<Drawer.Screen
name="Insights"
component={InsightsPage}
options={{
drawerIcon: () => <IconButton icon="lightbulb-on-outline" />,
}}
/>
2023-01-01 05:05:11 +00:00
<Drawer.Screen
name="Settings"
2023-01-01 05:05:11 +00:00
component={SettingsPage}
2023-10-26 05:49:56 +00:00
options={{ drawerIcon: () => <IconButton icon="cog-outline" /> }}
2023-01-01 05:05:11 +00:00
/>
</Drawer.Navigator>
);
2022-07-15 04:34:06 +00:00
}