alert-dialog-example.json — ui Source File
Architecture documentation for alert-dialog-example.json, a json file in the ui codebase.
Entity Profile
Source Code
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "alert-dialog-example",
"title": "Alert Dialog",
"registryDependencies": [
"alert-dialog",
"button",
"dialog",
"example"
],
"files": [
{
"path": "registry/radix-vega/examples/alert-dialog-example.tsx",
"content": "import {\n Example,\n ExampleWrapper,\n} from \"@/registry/radix-vega/components/example\"\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"@/registry/radix-vega/ui/alert-dialog\"\nimport { Button } from \"@/registry/radix-vega/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/radix-vega/ui/dialog\"\nimport { IconPlaceholder } from \"@/app/(create)/components/icon-placeholder\"\n\nexport default function AlertDialogExample() {\n return (\n <ExampleWrapper>\n <AlertDialogBasic />\n <AlertDialogSmall />\n <AlertDialogWithMedia />\n <AlertDialogSmallWithMedia />\n <AlertDialogDestructive />\n <AlertDialogInDialog />\n </ExampleWrapper>\n )\n}\n\nfunction AlertDialogBasic() {\n return (\n <Example title=\"Basic\" className=\"items-center\">\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\">Default</Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\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 <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction>Continue</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </Example>\n )\n}\n\nfunction AlertDialogSmall() {\n return (\n <Example title=\"Small\" className=\"items-center\">\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\">Small</Button>\n </AlertDialogTrigger>\n <AlertDialogContent size=\"sm\">\n <AlertDialogHeader>\n <AlertDialogTitle>Allow accessory to connect?</AlertDialogTitle>\n <AlertDialogDescription>\n Do you want to allow the USB accessory to connect to this device?\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Don't allow</AlertDialogCancel>\n <AlertDialogAction>Allow</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </Example>\n )\n}\n\nfunction AlertDialogWithMedia() {\n return (\n <Example title=\"With Media\" className=\"items-center\">\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\">Default (Media)</Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogMedia>\n <IconPlaceholder\n lucide=\"BluetoothIcon\"\n tabler=\"IconBluetooth\"\n hugeicons=\"BluetoothIcon\"\n phosphor=\"BluetoothIcon\"\n remixicon=\"RiBluetoothLine\"\n />\n </AlertDialogMedia>\n <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n <AlertDialogDescription>\n This will permanently delete your account and remove your data\n from our servers.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction>Continue</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </Example>\n )\n}\n\nfunction AlertDialogSmallWithMedia() {\n return (\n <Example title=\"Small With Media\" className=\"items-center\">\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\">Small (Media)</Button>\n </AlertDialogTrigger>\n <AlertDialogContent size=\"sm\">\n <AlertDialogHeader>\n <AlertDialogMedia>\n <IconPlaceholder\n lucide=\"BluetoothIcon\"\n tabler=\"IconBluetooth\"\n hugeicons=\"BluetoothIcon\"\n phosphor=\"BluetoothIcon\"\n remixicon=\"RiBluetoothLine\"\n />\n </AlertDialogMedia>\n <AlertDialogTitle>Allow accessory to connect?</AlertDialogTitle>\n <AlertDialogDescription>\n Do you want to allow the USB accessory to connect to this device?\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Don't allow</AlertDialogCancel>\n <AlertDialogAction>Allow</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </Example>\n )\n}\n\nfunction AlertDialogDestructive() {\n return (\n <Example title=\"Destructive\" className=\"items-center\">\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"destructive\">Delete Chat</Button>\n </AlertDialogTrigger>\n <AlertDialogContent size=\"sm\">\n <AlertDialogHeader>\n <AlertDialogMedia className=\"bg-destructive/10 text-destructive dark:bg-destructive/20 dark:text-destructive\">\n <IconPlaceholder\n lucide=\"Trash2Icon\"\n tabler=\"IconTrash\"\n hugeicons=\"Delete02Icon\"\n phosphor=\"TrashIcon\"\n remixicon=\"RiDeleteBinLine\"\n />\n </AlertDialogMedia>\n <AlertDialogTitle>Delete chat?</AlertDialogTitle>\n <AlertDialogDescription>\n This will permanently delete this chat conversation. View{\" \"}\n <a href=\"#\">Settings</a> delete any memories saved during this\n chat.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel variant=\"ghost\">Cancel</AlertDialogCancel>\n <AlertDialogAction variant=\"destructive\">Delete</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </Example>\n )\n}\n\nfunction AlertDialogInDialog() {\n return (\n <Example title=\"In Dialog\" className=\"items-center\">\n <Dialog>\n <DialogTrigger asChild>\n <Button variant=\"outline\">Open Dialog</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Alert Dialog Example</DialogTitle>\n <DialogDescription>\n Click the button below to open an alert dialog.\n </DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button>Open Alert Dialog</Button>\n </AlertDialogTrigger>\n <AlertDialogContent size=\"sm\">\n <AlertDialogHeader>\n <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n <AlertDialogDescription>\n This action cannot be undone. This will permanently delete\n your account and remove your data from our servers.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction>Continue</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </Example>\n )\n}\n",
"type": "registry:example"
}
],
"type": "registry:example"
}
Source
Frequently Asked Questions
What does alert-dialog-example.json do?
alert-dialog-example.json is a source file in the ui codebase, written in json.
Where is alert-dialog-example.json in the architecture?
alert-dialog-example.json is located at apps/v4/public/r/styles/radix-vega/alert-dialog-example.json (directory: apps/v4/public/r/styles/radix-vega).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free