Spaces:
Runtime error
Runtime error
File size: 643 Bytes
1720172 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | export default function Card({ title, action, children, className = '' }) {
return (
<div className={`bg-surface border border-border rounded-lg overflow-hidden ${className}`}>
{(title || action) && (
<div className="flex items-center justify-between px-5 py-4 border-b border-border">
{typeof title === 'string' ? (
<h3 className="text-sm font-medium text-ink">{title}</h3>
) : (
<div className="text-sm font-medium text-ink flex items-center gap-2">{title}</div>
)}
{action && <div>{action}</div>}
</div>
)}
{children}
</div>
);
}
|