55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import { cn } from "@/lib/utils"
|
|
import { HTMLAttributes } from "react"
|
|
|
|
interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
className?: string
|
|
children?: React.ReactNode
|
|
}
|
|
|
|
export function Card({ className, children, ...props }: CardProps) {
|
|
return (
|
|
<div className={cn("bg-card text-card-foreground border border-border rounded-lg shadow-sm", className)} {...props}>
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export function CardHeader({ className, children, ...props }: CardProps) {
|
|
return (
|
|
<div className={cn("flex flex-col space-y-1.5 p-6", className)} {...props}>
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export function CardTitle({ className, children, ...props }: CardProps) {
|
|
return (
|
|
<h3 className={cn("text-2xl font-semibold leading-none tracking-tight", className)} {...props}>
|
|
{children}
|
|
</h3>
|
|
)
|
|
}
|
|
|
|
export function CardDescription({ className, children, ...props }: CardProps) {
|
|
return (
|
|
<p className={cn("text-sm text-muted-foreground", className)} {...props}>
|
|
{children}
|
|
</p>
|
|
)
|
|
}
|
|
|
|
export function CardContent({ className, children, ...props }: CardProps) {
|
|
return (
|
|
<div className={cn("p-6 pt-0", className)} {...props}>
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export function CardFooter({ className, children, ...props }: CardProps) {
|
|
return (
|
|
<div className={cn("flex items-center p-6 pt-0", className)} {...props}>
|
|
{children}
|
|
</div>
|
|
)
|
|
} |