"use client" import * as React from "react" import { Drawer as DrawerPrimitive } from "vaul" import { cn } from "@eloquent/styles" import { type VariantProps } from "class-variance-authority"; import { drawerVariants } from "./variants"; const Root = ({ shouldScaleBackground = true, ...props }: React.ComponentProps) => ( ) Root.displayName = "Drawer" const DrawerTrigger = DrawerPrimitive.Trigger const DrawerPortal = DrawerPrimitive.Portal const DrawerClose = DrawerPrimitive.Close const DrawerOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )) DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName const DrawerContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & VariantProps >(({ className, children, variant, ...props }, ref) => (
{children} )) DrawerContent.displayName = "DrawerContent" const DrawerHeader = ({ className, ...props }: React.HTMLAttributes) => (
) DrawerHeader.displayName = "DrawerHeader" const DrawerFooter = ({ className, ...props }: React.HTMLAttributes) => (
) DrawerFooter.displayName = "DrawerFooter" const DrawerTitle = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )) DrawerTitle.displayName = DrawerPrimitive.Title.displayName const DrawerDescription = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )) DrawerDescription.displayName = DrawerPrimitive.Description.displayName export const Drawer = { Root, Portal: DrawerPortal, Overlay: DrawerOverlay, Trigger: DrawerTrigger, Close: DrawerClose, Content: DrawerContent, Header: DrawerHeader, Footer: DrawerFooter, Title: DrawerTitle, Description: DrawerDescription, }