mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-01 00:24:20 +00:00
* Initial plan * Fix callout component to use rounded-lg in style-lyra.css Co-authored-by: shadcn <124599+shadcn@users.noreply.github.com> * Revert CSS change - callout.tsx already has rounded-lg Co-authored-by: shadcn <124599+shadcn@users.noreply.github.com> * Change callout rounded class from rounded-lg to rounded-xl Co-authored-by: shadcn <124599+shadcn@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: shadcn <124599+shadcn@users.noreply.github.com>
36 lines
764 B
TypeScript
36 lines
764 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,
|
|
variant = "default",
|
|
...props
|
|
}: React.ComponentProps<typeof Alert> & {
|
|
icon?: React.ReactNode
|
|
variant?: "default" | "info" | "warning"
|
|
}) {
|
|
return (
|
|
<Alert
|
|
data-variant={variant}
|
|
className={cn(
|
|
"bg-surface text-surface-foreground border-surface mt-6 w-auto rounded-xl md:-mx-1 **:[code]:border",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{icon}
|
|
{title && <AlertTitle>{title}</AlertTitle>}
|
|
<AlertDescription className="text-card-foreground/80">
|
|
{children}
|
|
</AlertDescription>
|
|
</Alert>
|
|
)
|
|
}
|