import { Card, CardContent } from '@heroui/react'; import type { ReactNode } from 'react'; type Props = { icon: ReactNode; label: string; value: string | number; trend?: string; color?: 'accent' | 'success' | 'warning' | 'danger' | 'default'; }; const iconClasses: Record, string> = { accent: 'bg-accent-soft text-accent-soft-foreground', success: 'bg-success-soft text-success-soft-foreground', warning: 'bg-warning-soft text-warning-soft-foreground', danger: 'bg-danger-soft text-danger-soft-foreground', default: 'bg-default-soft text-muted', }; export function StatCard({ icon, label, value, trend, color = 'default' }: Props) { return (
{icon}
{label}
{value}
{trend && ( {trend} )}
); }