import TableCell from '@mui/material/TableCell' import TableRow from '@mui/material/TableRow' import _get from 'lodash/get' import _identity from 'lodash/identity' import React from 'react' import tableConfig from './tableConfig' const Row = ({ row, handleDetailsInfo, columns = [], hideDetailsButton, }: RowPropsTypes) => ( *': { borderBottom: 'unset' } }}> {tableConfig(columns).body.map((column: ITableBodyType, index: number) => ( { const { columnProps, component }: IRowReturnType = column(row) const onCellClick = columnProps?.onCellClick || _identity const componentProps = _get(component, 'props', {}) onCellClick(componentProps, e) }} > {column(row).component} ))} {!hideDetailsButton && ( )} ) export default Row