Files
cosscom__coss/apps/ui/public/r/switch-with-description.json
Volnei Munhoz d5a915e6d0 add biome
2025-11-13 19:19:31 -03:00

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"]
}