Skip to content

Estimate

Marks a figure as partial/estimated: value + engraved "+" with tooltip.

Prop Type Notes
note string Tooltip: what is unknown.
children React.ReactNode

Preview

Declarations

TypeScript
export interface DataTableColumn {
  /** Row-object key this column reads. */
  key: string;
  label: React.ReactNode;
  /** Right-aligned, mono, tabular — money, counts, durations. */
  numeric?: boolean;
  /** Mono without right-alignment — ids, model names. */
  mono?: boolean;
}

export interface DataTableProps extends React.TableHTMLAttributes<HTMLTableElement> {
  columns: DataTableColumn[];
  /** One object per row; values are ReactNodes keyed by column key. */
  rows: Array<Record<string, React.ReactNode>>;
  /** Optional totals row (semibold, strong top rule). */
  foot?: Record<string, React.ReactNode>;
  caption?: string;
  className?: string;
}

export interface EstimateProps {
  /** Tooltip: what is unknown. */
  note?: string;
  children?: React.ReactNode;
}

/**
 * Data table for the app register. Text left, hairline row rules, money in
 * tabular mono — exact and never rounded up. Below 640px rows stack into
 * labelled pairs rather than scrolling silently.
 */
export function DataTable(props: DataTableProps): React.JSX.Element;

/** Marks a figure as partial/estimated: value + engraved "+" with tooltip. */
export function Estimate(props: EstimateProps): React.JSX.Element;