import React, { ReactNode } from 'react'; import { Row, Hooks } from 'react-table'; import Icon from '../Icon'; import { StyledExpandableIcon } from './StyledTable'; export default >(hooks: Hooks): void => { hooks.visibleColumns.push(cols => [ { id: 'expander', Header: (): ReactNode => null, Cell: function Cell({ row, customRowExpandable, }: { customRowExpandable: (rowData: D) => boolean; row: Row; }): ReactNode { return customRowExpandable(row.original) ? ( ) : null; }, }, ...cols, ]); };