mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-02 00:54:15 +00:00
22 lines
477 B
TypeScript
22 lines
477 B
TypeScript
import {
|
|
Alert,
|
|
AlertDescription,
|
|
AlertTitle,
|
|
} from "@/registry/new-york/ui/alert"
|
|
|
|
interface CalloutProps {
|
|
icon?: string
|
|
title?: string
|
|
children?: React.ReactNode
|
|
}
|
|
|
|
export function Callout({ title, children, icon, ...props }: CalloutProps) {
|
|
return (
|
|
<Alert {...props}>
|
|
{icon && <span className="mr-4 text-2xl">{icon}</span>}
|
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
<AlertDescription>{children}</AlertDescription>
|
|
</Alert>
|
|
)
|
|
}
|