export interface TelemetryItem { /** Stable id — rows key on this, never on the array index. */ id: string; label: string; value: string; /** The mono annotation under the value: a unit, a window, a limit. */ note?: string; /** Anything but `neutral` is a status claim, not decoration. */ tone?: 'neutral' | 'ok' | 'warn'; } export interface TelemetryProps { items: TelemetryItem[]; /** Names the readout. Set above the first row. */ caption?: string; className?: string; } export function Telemetry({ items, caption, className }: TelemetryProps) { return (
{caption !== undefined &&

{caption}

}
{items.map((item) => (
{item.label}
{item.value} {item.note !== undefined && {item.note}}
))}
); }