import React, { useState, useEffect } from 'react' import { map, set } from 'lodash/fp' import classnames from 'classnames' import uuidv1 from 'uuid/v1' import { makeStyles } from '@material-ui/core/styles' import { Table, THead, Tr, TBody, Td, Th } from '../fake-table/Table' import { ReactComponent as ExpandClosedIcon } from '../../styling/icons/action/expand/closed.svg' import { ReactComponent as ExpandOpenIcon } from '../../styling/icons/action/expand/open.svg' import { mainWidth } from '../../styling/variables' const styles = { hideDetailsRow: { display: 'none' }, expandButton: { border: 'none', backgroundColor: 'transparent', cursor: 'pointer', padding: 4 } } const useStyles = makeStyles(styles) const ExpRow = ({ id, columns, details, sizes, expanded, className, expandRow, ...props }) => { const classes = useStyles() const detailsRowClasses = { [classes.detailsRow]: true, [classes.hideDetailsRow]: expanded } return ( <>
| {header.value} | ))} {rowStates && rowStates.map((r, idx) => { const row = rows[idx] return (
|---|