mirror of
https://github.com/cosscom/coss.git
synced 2026-09-14 20:06:50 +08:00
16 lines
1.6 KiB
JSON
16 lines
1.6 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "alert-dialog-demo",
|
|
"type": "registry:example",
|
|
"description": "Alert dialog",
|
|
"registryDependencies": ["@coss/alert-dialog", "@coss/button"],
|
|
"files": [
|
|
{
|
|
"path": "registry/default/examples/alert-dialog-demo.tsx",
|
|
"content": "import {\n AlertDialog,\n AlertDialogClose,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogPopup,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"@/registry/default/ui/alert-dialog\"\nimport { Button } from \"@/registry/default/ui/button\"\n\nexport default function AlertDialogDemo() {\n return (\n <AlertDialog>\n <AlertDialogTrigger render={<Button variant=\"destructive-outline\" />}>\n Delete Account\n </AlertDialogTrigger>\n <AlertDialogPopup>\n <AlertDialogHeader>\n <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n <AlertDialogDescription>\n This action cannot be undone. This will permanently delete your\n account and remove your data from our servers.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogClose render={<Button variant=\"ghost\" />}>\n Cancel\n </AlertDialogClose>\n <AlertDialogClose render={<Button variant=\"destructive\" />}>\n Delete Account\n </AlertDialogClose>\n </AlertDialogFooter>\n </AlertDialogPopup>\n </AlertDialog>\n )\n}\n",
|
|
"type": "registry:example"
|
|
}
|
|
],
|
|
"categories": ["dialog"]
|
|
}
|