mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
40 lines
996 B
TypeScript
40 lines
996 B
TypeScript
import { Ionicons, MaterialIcons } from "@expo/vector-icons";
|
|
import { Link } from "expo-router";
|
|
import { Drawer } from "expo-router/drawer";
|
|
|
|
import { HeaderButton } from "@/components/header-button";
|
|
|
|
const DrawerLayout = () => {
|
|
return (
|
|
<Drawer>
|
|
<Drawer.Screen
|
|
name="index"
|
|
options={{
|
|
headerTitle: "Home",
|
|
drawerLabel: "Home",
|
|
drawerIcon: ({ size, color }) => (
|
|
<Ionicons name="home-outline" size={size} color={color} />
|
|
),
|
|
}}
|
|
/>
|
|
<Drawer.Screen
|
|
name="(tabs)"
|
|
options={{
|
|
headerTitle: "Tabs",
|
|
drawerLabel: "Tabs",
|
|
drawerIcon: ({ size, color }) => (
|
|
<MaterialIcons name="border-bottom" size={size} color={color} />
|
|
),
|
|
headerRight: () => (
|
|
<Link href="/modal" asChild>
|
|
<HeaderButton />
|
|
</Link>
|
|
),
|
|
}}
|
|
/>
|
|
</Drawer>
|
|
);
|
|
};
|
|
|
|
export default DrawerLayout;
|