2026-07-08 15:02:03 +08:00
|
|
|
import * as React from "react";
|
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
|
|
|
|
|
export function Card({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
className={cn(
|
|
|
|
|
"rounded-[var(--radius)] border bg-[var(--color-surface)] shadow-sm",
|
|
|
|
|
className
|
|
|
|
|
)}
|
|
|
|
|
{...props}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function CardHeader({
|
|
|
|
|
className,
|
|
|
|
|
...props
|
|
|
|
|
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
|
|
|
return (
|
|
|
|
|
<div
|
2026-08-29 21:55:10 +08:00
|
|
|
className={cn("flex flex-wrap items-center justify-between gap-2 border-b px-4 py-3 md:px-5 md:py-4", className)}
|
2026-07-08 15:02:03 +08:00
|
|
|
{...props}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function CardTitle({
|
|
|
|
|
className,
|
|
|
|
|
...props
|
|
|
|
|
}: React.HTMLAttributes<HTMLHeadingElement>) {
|
2026-08-29 21:55:10 +08:00
|
|
|
return <h3 className={cn("min-w-0 text-sm font-semibold break-words", className)} {...props} />;
|
2026-07-08 15:02:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function CardContent({
|
|
|
|
|
className,
|
|
|
|
|
...props
|
|
|
|
|
}: React.HTMLAttributes<HTMLDivElement>) {
|
2026-08-29 21:55:10 +08:00
|
|
|
return <div className={cn("p-4 md:p-5", className)} {...props} />;
|
2026-07-08 15:02:03 +08:00
|
|
|
}
|