41 lines
909 B
TypeScript
41 lines
909 B
TypeScript
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
|
||
|
|
className={cn("flex items-center justify-between border-b px-5 py-4", className)}
|
||
|
|
{...props}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export function CardTitle({
|
||
|
|
className,
|
||
|
|
...props
|
||
|
|
}: React.HTMLAttributes<HTMLHeadingElement>) {
|
||
|
|
return <h3 className={cn("text-sm font-semibold", className)} {...props} />;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function CardContent({
|
||
|
|
className,
|
||
|
|
...props
|
||
|
|
}: React.HTMLAttributes<HTMLDivElement>) {
|
||
|
|
return <div className={cn("p-5", className)} {...props} />;
|
||
|
|
}
|