Some checks failed
Deploy to Cloudflare Workers / deploy (push) Has been cancelled
45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
import { cn } from "@/lib/utils";
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
|
|
interface GlassCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
highlight?: boolean;
|
|
title?: string;
|
|
description?: string;
|
|
}
|
|
|
|
/** @deprecated Prefer Card directly — kept for gradual migration */
|
|
export function GlassCard({
|
|
className,
|
|
highlight,
|
|
title,
|
|
description,
|
|
children,
|
|
...props
|
|
}: GlassCardProps) {
|
|
return (
|
|
<Card
|
|
className={cn(
|
|
highlight && "border-[color-mix(in_oklab,var(--chart-1)_35%,var(--border))]",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{(title || description) && (
|
|
<CardHeader className="pb-3">
|
|
{title && <CardTitle>{title}</CardTitle>}
|
|
{description && <CardDescription>{description}</CardDescription>}
|
|
</CardHeader>
|
|
)}
|
|
<CardContent className={title || description ? undefined : "pt-6"}>
|
|
{children}
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
}
|