index.tsx raw
1 import { Button } from '@/components/ui/button'
2 import { DrawerClose } from '@/components/ui/drawer'
3 import { cn } from '@/lib/utils'
4
5 export default function DrawerMenuItem({
6 children,
7 className,
8 onClick
9 }: {
10 children: React.ReactNode
11 className?: string
12 onClick?: (e: React.MouseEvent) => void
13 }) {
14 return (
15 <DrawerClose className="w-full">
16 <Button
17 onClick={onClick}
18 className={cn('w-full p-6 justify-start text-lg gap-4 [&_svg]:size-5', className)}
19 variant="ghost"
20 >
21 {children}
22 </Button>
23 </DrawerClose>
24 )
25 }
26