Files
shadcn-ui/apps/v4/components/callout.tsx
2025-07-07 15:10:32 +04:00

31 lines
636 B
TypeScript

import { cn } from "@/lib/utils"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/registry/new-york-v4/ui/alert"
export function Callout({
title,
children,
icon,
className,
...props
}: React.ComponentProps<typeof Alert> & { icon?: React.ReactNode }) {
return (
<Alert
className={cn(
"bg-surface text-surface-foreground mt-6 w-auto border-none md:-mx-1",
className
)}
{...props}
>
{icon}
{title && <AlertTitle>{title}</AlertTitle>}
<AlertDescription className="text-card-foreground/80">
{children}
</AlertDescription>
</Alert>
)
}