Files
shadcn-ui/apps/www/components/callout.tsx
shadcn 64739f8399 feat: react 19 (#5621)
* feat(shadcn): add flag prompt for npm

* docs: add docs for react 19

* chore: add changeset

* test: update snapshots

* docs: add notes for recharts

* docs: fix

* fix

* fix: linting
2024-10-29 21:30:05 +04:00

23 lines
524 B
TypeScript

import { cn } from "@/lib/utils"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/registry/new-york/ui/alert"
export function Callout({
title,
children,
icon,
className,
...props
}: React.ComponentProps<typeof Alert> & { icon?: string }) {
return (
<Alert className={cn("bg-muted/50", className)} {...props}>
{icon && <span className="mr-4 text-2xl">{icon}</span>}
{title && <AlertTitle>{title}</AlertTitle>}
<AlertDescription>{children}</AlertDescription>
</Alert>
)
}