23 lines
564 B
TypeScript
23 lines
564 B
TypeScript
import { cn } from '@/lib/utils'
|
|
|
|
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
children: React.ReactNode
|
|
hover?: boolean
|
|
}
|
|
|
|
export default function Card({ className, children, hover = true, ...props }: CardProps) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'bg-background-card rounded-2xl border border-border p-6',
|
|
'transition-all duration-200',
|
|
hover && 'hover:shadow-elevated hover:-translate-y-0.5 hover:border-foreground/20',
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|