{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "split-button-demo", "registryDependencies": [ "https://reusables.vercel.app/r/split-button", "https://reusables.vercel.app/r/notify" ], "files": [ { "path": "registry/example/split-button-demo.tsx", "content": "\"use client\"\n\nimport { toast } from \"@/packages/notify/src\"\n\nimport { SplitButton } from \"@/components/ui/split-button\"\n\nexport default function Demo() {\n const handleDownloadPNG = () => {\n toast.success(\"Downloading PNG\", {\n description: \"Your file is being downloaded...\",\n })\n }\n\n const options = [\n {\n label: \"Copy SVG\",\n onClick: () => {\n toast.success(\"Copied SVG\", {\n description: \"SVG code copied to clipboard\",\n })\n },\n },\n {\n label: \"Copy Data URL\",\n onClick: () => {\n toast.success(\"Copied Data URL\", {\n description: \"Data URL copied to clipboard\",\n })\n },\n },\n {\n label: \"Download SVG\",\n onClick: () => {\n toast.success(\"Downloading SVG\", {\n description: \"Your file is being downloaded...\",\n })\n },\n },\n {\n label: \"Download PNG\",\n onClick: () => handleDownloadPNG(),\n },\n ]\n\n return (\n
\n
\n

\n Default Split Button\n

\n \n Download PNG\n \n
\n\n
\n

\n Secondary Variant\n

\n \n Download PNG\n \n
\n\n
\n

\n Outline Variant\n

\n \n Download PNG\n \n
\n\n
\n

\n Small Size Variant\n

\n \n Download PNG\n \n
\n
\n )\n}\n", "type": "registry:example", "target": "components/split-button-demo.tsx" } ], "type": "registry:example" }