import { cn } from './utils'; import type { VariantProps } from 'class-variance-authority'; import { cva } from 'class-variance-authority'; import type { HTMLAttributes } from 'react'; import { forwardRef } from 'react'; const variants = cva('flex p-4 mb-4 text-s rounded-md', { defaultVariants: { color: 'default', }, variants: { color: { danger: 'border-red-300 bg-red-50 p-4 text-sm text-red-800', default: 'border-blue-300 bg-blue-50 p-4 text-sm text-blue-800', success: 'border-green-300 bg-green-50 p-4 text-sm text-green-800', warning: 'border-yellow-300 bg-yellow-50 p-4 text-sm text-yellow-800', }, }, }); export type AlertProps = HTMLAttributes & VariantProps & { readonly description?: string; readonly title: string }; export const Alert = forwardRef( ({ className, color, description, title, ...props }, ref) => (
Info
{title} {description &&
{description}
}
) );