{ "$schema": "https://blode.co/ui/schema/registry-item.json", "name": "drawer", "title": "Drawer", "author": "Matthew Blode", "description": "A panel that slides in from the edge of the screen.", "dependencies": ["@base-ui/react"], "files": [ { "path": "ui/drawer.tsx", "content": "\"use client\";\n\nimport { Drawer as DrawerPrimitive } from \"@base-ui/react/drawer\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Drawer = ({ ...props }: DrawerPrimitive.Root.Props) => (\n \n);\n\nconst DrawerTrigger = ({\n asChild,\n children,\n ...props\n}: DrawerPrimitive.Trigger.Props & {\n asChild?: boolean;\n}) => {\n if (asChild && React.isValidElement(children)) {\n return ;\n }\n\n return (\n \n {children}\n \n );\n};\n\nconst DrawerPortal = ({ ...props }: DrawerPrimitive.Portal.Props) => (\n \n);\n\nconst DrawerClose = ({\n asChild,\n children,\n ...props\n}: DrawerPrimitive.Close.Props & {\n asChild?: boolean;\n}) => {\n if (asChild && React.isValidElement(children)) {\n return ;\n }\n\n return (\n \n {children}\n \n );\n};\n\nconst DrawerBackdrop = ({ className, ...props }: DrawerPrimitive.Backdrop.Props) => (\n \n);\n\nconst DrawerOverlay = DrawerBackdrop;\n\nconst DrawerViewport = ({ className, ...props }: DrawerPrimitive.Viewport.Props) => (\n \n);\n\nconst DrawerPopup = ({ className, ...props }: DrawerPrimitive.Popup.Props) => (\n \n);\n\nconst DrawerContent = ({ className, children, ...props }: DrawerPrimitive.Popup.Props) => (\n \n \n \n \n \n {children}\n \n \n \n \n);\n\nconst DrawerHeader = ({ className, ...props }: React.ComponentProps<\"div\">) => (\n \n);\n\nconst DrawerFooter = ({ className, ...props }: React.ComponentProps<\"div\">) => (\n \n);\n\nconst DrawerTitle = ({\n className,\n ...props\n}: React.ComponentProps) => (\n \n);\n\nconst DrawerDescription = ({\n className,\n ...props\n}: React.ComponentProps) => (\n \n);\n\nexport {\n Drawer,\n DrawerBackdrop,\n DrawerPortal,\n DrawerPopup,\n DrawerOverlay,\n DrawerTrigger,\n DrawerViewport,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n", "type": "registry:ui", "target": "" } ], "type": "registry:ui" }