{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "alert", "title": "Alert", "description": "Displays a callout for important messages.", "dependencies": [ "class-variance-authority" ], "files": [ { "path": "registry/default/ui/alert.tsx", "content": "import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst alertVariants = cva(\n 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'text-destructive-foreground bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive-foreground/90',\n info: 'text-info-foreground bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-info-foreground/90',\n warning:\n 'text-warning-foreground bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90',\n success:\n 'text-success-foreground bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps) {\n return (\n \n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nfunction AlertContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nexport { Alert, AlertContent, AlertDescription, AlertTitle };\n", "type": "registry:ui" } ], "type": "registry:ui" }