import { Cell, TableRowProps } from 'react-table'; import { useTableContext } from './TableContainer'; interface Props = Record> extends TableRowProps { cells: Cell[]; } export function TableRow< D extends Record = Record >({ cells, className, role, style }: Props) { useTableContext(); return ( {cells.map((cell) => { const cellProps = cell.getCellProps({ className: cell.className, }); return ( {cell.render('Cell')} ); })} ); }