/** * Metrics card component - displays a single metric value. */ interface MetricsCardProps { title: string; value: number; unit?: string; decimals?: number; compact?: boolean; } export default function MetricsCard({ title, value, unit, decimals = 0, compact = false, }: MetricsCardProps) { const formattedValue = value.toFixed(decimals); if (compact) { return (
{title}
{formattedValue} {unit && {unit}}
); } return (
{title}
{formattedValue} {unit && {unit}}
); }