mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-27 22:54:18 +00:00
31 lines
636 B
TypeScript
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>
|
|
)
|
|
}
|