mirror of
https://github.com/cosscom/coss.git
synced 2026-09-14 20:06:50 +08:00
16 lines
1.0 KiB
JSON
16 lines
1.0 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "switch-with-description",
|
|
"type": "registry:example",
|
|
"description": "Switch with description",
|
|
"registryDependencies": ["@coss/switch", "@coss/label"],
|
|
"files": [
|
|
{
|
|
"path": "registry/default/examples/switch-with-description.tsx",
|
|
"content": "import * as React from \"react\"\n\nimport { Label } from \"@/registry/default/ui/label\"\nimport { Switch } from \"@/registry/default/ui/switch\"\n\nexport default function SwitchWithDescriptionDemo() {\n const id = React.useId()\n\n return (\n <div className=\"flex items-start gap-2\">\n <Switch id={id} defaultChecked />\n <div className=\"flex flex-col gap-1\">\n <Label htmlFor={id}>Marketing emails</Label>\n <p className=\"text-xs text-muted-foreground\">\n By enabling marketing emails, you agree to receive emails.\n </p>\n </div>\n </div>\n )\n}\n",
|
|
"type": "registry:example"
|
|
}
|
|
],
|
|
"categories": ["switch", "label", "helper", "hint"]
|
|
}
|