import { CSSProperties, ReactNode } from 'react'; import { Row } from 'react-table'; import { TableRow } from './TableRow'; interface Props> { row: Row; className?: string; role?: string; style?: CSSProperties; disableSelect?: boolean; renderSubRow(row: Row): ReactNode; } export function ExpandableDatatableTableRow>({ row, className, role, style, disableSelect, renderSubRow, }: Props) { return ( <> cells={row.cells} className={className} role={role} style={style} /> {row.isExpanded && ( {!disableSelect && } {renderSubRow(row)} )} ); }