import type { ReactNode } from 'react'; export interface DataTableColumn { key: string; label: string; /** Right-align and tabular-figure this column. */ numeric?: boolean; } export interface DataTableProps { columns: DataTableColumn[]; rows: Array>; className?: string; } export function DataTable({ columns, rows, className }: DataTableProps) { return ( {columns.map((c) => ())} {rows.map((r, i) => ( {columns.map((c) => ())} ))}
{c.label}
{r[c.key]}
); }