import * as React from "react"; import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; const calloutVariants = cva( "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", { variants: { variant: { default: "bg-background text-foreground border-border", destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive bg-destructive/5", warning: "border-yellow-500/50 text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-950/50 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400", info: "border-blue-500/50 text-blue-700 dark:text-blue-400 bg-blue-50 dark:bg-blue-950/50 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400", }, }, defaultVariants: { variant: "default", }, } ); const Callout = React.forwardRef< HTMLDivElement, React.HTMLAttributes & VariantProps >(({ className, variant, ...props }, ref) => (
)); Callout.displayName = "Callout"; const CalloutTitle = React.forwardRef>( ({ className, ...props }, ref) => (
) ); CalloutTitle.displayName = "CalloutTitle"; const CalloutDescription = React.forwardRef>( ({ className, ...props }, ref) => (
) ); CalloutDescription.displayName = "CalloutDescription"; export { Callout, CalloutTitle, CalloutDescription };