'use client'; import * as React from 'react'; import * as SheetPrimitive from '@radix-ui/react-dialog'; import { cn } from '@/styles/theme'; import { zIndex } from '@/styles/constants'; const SheetRoot = SheetPrimitive.Root; const SheetPortal = SheetPrimitive.Portal; const SheetTitle = SheetPrimitive.Title; const SheetDescription = SheetPrimitive.Description; const SheetOverlay = ({ className, ...props }: React.ComponentPropsWithoutRef) => ( ); type SheetProps = { children: React.ReactNode; isOpen: boolean; onClose: () => void; className?: string; side?: 'top' | 'bottom' | 'left' | 'right'; /** Title of the sheet, used for a11y purposes */ title: string; /** Description of the sheet, used for a11y purposes */ description: string; } & React.ComponentProps; export const Sheet = ({ children, className, isOpen, onClose, side = 'right', title, description, ...rest }: SheetProps) => { return ( { if (!flag) { onClose(); } }} > {title} {description} {children} ); };