Files
writer-work-flow/apps/web/components/ui/Card.tsx
2026-06-28 07:31:20 +02:00

22 lines
439 B
TypeScript

import type { HTMLAttributes, ReactNode } from "react";
import { cardClass } from "@/lib/ui/variants";
interface CardProps extends HTMLAttributes<HTMLElement> {
children: ReactNode;
as?: "article" | "div" | "section";
}
export function Card({
as: Component = "div",
children,
className,
...props
}: CardProps) {
return (
<Component className={cardClass(className)} {...props}>
{children}
</Component>
);
}