mirror of
https://github.com/arthur-pbty/flint.git
synced 2026-08-02 04:37:57 +02:00
60 lines
1.2 KiB
TypeScript
60 lines
1.2 KiB
TypeScript
import type { HTMLAttributes } from "react";
|
|
|
|
import { cn } from "./cn";
|
|
|
|
export function Card({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"rounded-2xl border border-[var(--border-subtle)] bg-[var(--surface)] p-6 shadow-[var(--shadow-soft)]",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export function CardHeader({
|
|
className,
|
|
...props
|
|
}: HTMLAttributes<HTMLDivElement>) {
|
|
return <div className={cn("mb-5 space-y-2", className)} {...props} />;
|
|
}
|
|
|
|
export function CardTitle({
|
|
className,
|
|
...props
|
|
}: HTMLAttributes<HTMLHeadingElement>) {
|
|
return (
|
|
<h2
|
|
className={cn(
|
|
"text-xl font-semibold tracking-tight text-[var(--foreground)]",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export function CardDescription({
|
|
className,
|
|
...props
|
|
}: HTMLAttributes<HTMLParagraphElement>) {
|
|
return (
|
|
<p
|
|
className={cn(
|
|
"text-sm leading-relaxed text-[var(--foreground-muted)]",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export function CardContent({
|
|
className,
|
|
...props
|
|
}: HTMLAttributes<HTMLDivElement>) {
|
|
return <div className={cn("space-y-4", className)} {...props} />;
|
|
}
|