import { Cell, ColumnMeta, flexRender } from '@tanstack/react-table'; import clsx from 'clsx'; import { DefaultType } from './types'; interface Props { cells: Cell[]; className?: string; onClick?: () => void; } export function TableRow({ cells, className, onClick, }: Props) { return ( {cells.map((cell) => ( {flexRender(cell.column.columnDef.cell, cell.getContext())} ))} ); } function getClassName( meta: ColumnMeta | undefined ) { return !!meta && 'className' in meta && typeof meta.className === 'string' ? meta.className : ''; }