import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; const StudyListTableRow = (props) => { const { tableData } = props; const { row, expandedContent, onClickRow, isExpanded } = tableData; return ( <>
{row.map((cell) => { const { content, gridCol, name } = cell; return ( ); })} {isExpanded && ( )}
{content}
{expandedContent}
); }; StudyListTableRow.propTypes = { tableData: PropTypes.shape({ row: PropTypes.arrayOf( PropTypes.shape({ key: PropTypes.string.isRequired, content: PropTypes.node.isRequired, gridCol: PropTypes.number.isRequired, }) ).isRequired, expandedContent: PropTypes.node.isRequired, onClickRow: PropTypes.func.isRequired, isExpanded: PropTypes.bool.isRequired, }), }; export default StudyListTableRow;