{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "alert", "title": "Alert", "description": "An alert component", "dependencies": [ "@ark-ui/react", "class-variance-authority", "clsx", "tailwind-merge" ], "files": [ { "path": "src/registry/thornberry/components/alert.tsx", "content": "import { ark } from \"@ark-ui/react\";\nimport { cva } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport type { VariantProps } from \"class-variance-authority\";\nimport type { ComponentProps } from \"react\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-5 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:top-4 [&>svg]:left-4 [&>svg]:text-foreground [&>svg~*]:pl-7\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n error:\n \"border-destructive/50 bg-destructive/5 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n info: \"border-blue-500/50 bg-blue-500/5 text-blue-500 dark:border-blue-500 [&>svg]:text-blue-500\",\n warning:\n \"border-yellow-500/50 bg-yellow-500/5 text-yellow-500 dark:border-yellow-500 [&>svg]:text-yellow-500\",\n success:\n \"border-green-500/50 bg-green-500/5 text-green-500 dark:border-green-500 [&>svg]:text-green-500\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nconst AlertRoot = ({\n className,\n variant,\n ...rest\n}: ComponentProps & VariantProps) => (\n \n);\n\nconst AlertIcon = ({ className, ...rest }: ComponentProps) => (\n \n);\n\nconst AlertTitle = ({ className, ...rest }: ComponentProps) => (\n \n);\n\nconst AlertDescription = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nexport { AlertRoot, AlertIcon, AlertTitle, AlertDescription, alertVariants };\n", "type": "registry:ui" }, { "path": "src/lib/utils.ts", "content": "import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nimport type { ClassValue } from \"clsx\";\n\nexport const cn = (...inputs: ClassValue[]) => {\n return twMerge(clsx(inputs));\n};\n", "type": "registry:lib", "target": "" } ], "type": "registry:ui" }