{ "$schema": "https://blode.co/ui/schema/registry-item.json", "name": "alert-dialog", "title": "Alert Dialog", "author": "Matthew Blode", "description": "A modal dialog that interrupts the user with important content and expects a response.", "dependencies": ["@base-ui/react"], "registryDependencies": ["button"], "files": [ { "path": "ui/alert-dialog.tsx", "content": "\"use client\";\n\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\n\nconst AlertDialog = ({ ...props }: AlertDialogPrimitive.Root.Props) => (\n \n);\n\nconst AlertDialogTrigger = ({\n asChild,\n children,\n ...props\n}: AlertDialogPrimitive.Trigger.Props & {\n asChild?: boolean;\n}) => {\n if (asChild && React.isValidElement(children)) {\n return (\n \n );\n }\n\n return (\n \n {children}\n \n );\n};\n\nconst AlertDialogPortal = ({ ...props }: AlertDialogPrimitive.Portal.Props) => (\n \n);\n\nconst AlertDialogOverlay = ({ className, ...props }: AlertDialogPrimitive.Backdrop.Props) => (\n \n);\n\nconst AlertDialogContent = ({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\";\n}) => (\n \n \n \n \n);\n\nconst AlertDialogHeader = ({ className, ...props }: React.ComponentProps<\"div\">) => (\n \n);\n\nconst AlertDialogFooter = ({ className, ...props }: React.ComponentProps<\"div\">) => (\n \n);\n\nconst AlertDialogTitle = ({\n className,\n ...props\n}: React.ComponentProps) => (\n \n);\n\nconst AlertDialogDescription = ({\n className,\n ...props\n}: React.ComponentProps) => (\n \n);\n\nconst AlertDialogMedia = ({ className, ...props }: React.ComponentProps<\"div\">) => (\n \n);\n\nconst AlertDialogAction = ({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick, \"variant\" | \"size\">) => (\n }\n {...props}\n />\n);\n\nconst AlertDialogCancel = ({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick, \"variant\" | \"size\">) => (\n }\n {...props}\n />\n);\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n", "type": "registry:ui", "target": "" } ], "type": "registry:ui" }