import classNames from '~/lib/classNames' interface LiveReadoutProps { value: number | null unit?: string label: string /** Optional secondary line, e.g. a TTFT badge. */ sub?: string size?: 'md' | 'lg' className?: string } /** * Big monospace numeric readout for live metrics (tokens/sec, MB/s, %). * Uses tabular figures so the digits don't jitter as the value updates. */ export default function LiveReadout({ value, unit, label, sub, size = 'md', className = 'text-desert-green' }: LiveReadoutProps) { const display = value === null ? '--' : value >= 100 ? Math.round(value).toString() : value.toFixed(1) return (
{display} {unit && {unit}}
{label}
{sub &&
{sub}
}
) }