File
Blob: src/client/components/ui/card.tsx
| 1 | import type { HTMLAttributes } from "react"; |
| 2 | |
| 3 | type Variant = "default" | "accent"; |
| 4 | |
| 5 | interface CardProps extends HTMLAttributes<HTMLDivElement> { |
| 6 | variant?: Variant; |
| 7 | } |
| 8 | |
| 9 | const VARIANT_CLASSES: Record<Variant, string> = { |
| 10 | default: "rounded-2xl border border-zinc-800/60 bg-zinc-900/50 p-5 sm:p-6", |
| 11 | accent: "rounded-2xl border border-accent-500/20 bg-zinc-900/60 p-5 sm:p-6", |
| 12 | }; |
| 13 | |
| 14 | export const Card = ({ className = "", variant = "default", ...rest }: CardProps) => ( |
| 15 | <div className={`${VARIANT_CLASSES[variant]} ${className}`} {...rest} /> |
| 16 | ); |