{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "button-offcanvas", "title": "ButtonOffcanvas", "description": "A button that opens an offcanvas/sheet", "registryDependencies": [ "button", "sheet" ], "files": [ { "path": "registry/cs/ui/button-offcanvas/button-offcanvas.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Button, type CsBtnColor, type CsIcon } from \"@/registry/cs/ui/button/button\"\nimport { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription } from \"@/registry/cs/ui/sheet/sheet\"\n\ninterface ButtonOffcanvasProps {\n /** Button label text. */\n label?: string\n /** Button icon. */\n icon?: CsIcon\n /** Button variant. */\n variant?: \"fill\" | \"outline\" | \"inline\" | \"hover\"\n /** Button color. */\n color?: CsBtnColor\n /** Button size. */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n /** Sheet side. */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n /** Sheet title. */\n title?: string\n /** Sheet description. */\n description?: string\n /** Sheet content. */\n children: React.ReactNode\n className?: string\n}\n\nfunction ButtonOffcanvas({\n label,\n icon,\n variant = \"fill\",\n color = \"primary\",\n size = \"md\",\n side = \"right\",\n title,\n description,\n children,\n className,\n}: ButtonOffcanvasProps) {\n return (\n \n \n \n \n \n {(title || description) && (\n \n {title && {title}}\n {description && {description}}\n \n )}\n
\n {children}\n
\n
\n
\n )\n}\n\nexport { ButtonOffcanvas }\n", "type": "registry:ui" } ], "type": "registry:ui" }