import type { ReactNode } from 'react'; export interface LedgerRowProps { name: string; /** The runtime the spend belongs to. */ model?: string; /** Spent, already formatted — the component never does currency maths. */ spent: string; /** The ceiling, already formatted. */ budget: string; /** 0–1. Drives scaleX, never width. */ fraction: number; /** Said out loud when the row is over its ceiling — the colour is not the message. */ note?: string; icon?: ReactNode; className?: string; } export function LedgerRow({ name, model, spent, budget, fraction, note, icon, className, }: LedgerRowProps) { const clamped = Math.min(1, Math.max(0, fraction)); return (