Files
opencrm/frontend/src/components/ui/Card.tsx
T
Stefan Hacker 31f807fbd0 first commit
2026-01-29 01:16:54 +01:00

23 lines
686 B
TypeScript

import { ReactNode } from 'react';
interface CardProps {
children: ReactNode;
className?: string;
title?: string;
actions?: ReactNode;
}
export default function Card({ children, className = '', title, actions }: CardProps) {
return (
<div className={`bg-white rounded-lg shadow ${className}`}>
{(title || actions) && (
<div className="px-6 py-4 border-b border-gray-200 flex items-center justify-between">
{title && <h3 className="text-lg font-medium text-gray-900">{title}</h3>}
{actions && <div className="flex items-center gap-2">{actions}</div>}
</div>
)}
<div className="p-6">{children}</div>
</div>
);
}