feat: StudyListTable, ExpandedRow, API definitions (#1579)
* feat: StudyListTable Refactor * feat: StudyListTable + Props Refactor * fix expanded rows handler * update and fix study list doc page * fix date format * use moment to format date * expose new components * fix study list expanded row * Export and Create doc page for Pagination * API Definition, Export and Doc page for StudyListTable * StudyListTableRow * use real example to mount study list * move files * temporary change study list (viewer) structure * fix studyList * remove unused files * remove file * remove unused package * PR fixes * Remove console.dir Co-authored-by: Gustavo Lelis <galelis@gmail.com>
This commit is contained in:
1 parent
056f56f5b4
commit
f4b078912a
21 files changed
+858
-240
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import StudyListTableRow from './StudyListTableRow';
|
||||
|
||||
const StudyListTable = ({ tableDataSource }) => {
|
||||
return (
|
||||
<>
|
||||
<div className="bg-black">
|
||||
<div className="container m-auto relative">
|
||||
<table className="w-full text-white">
|
||||
<tbody>
|
||||
{tableDataSource.map((tableData, i) => {
|
||||
return <StudyListTableRow tableData={tableData} key={i} />;
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
StudyListTable.propTypes = {
|
||||
tableDataSource: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
row: PropTypes.array.isRequired,
|
||||
expandedContent: PropTypes.node.isRequired,
|
||||
onClickRow: PropTypes.func.isRequired,
|
||||
isExpanded: PropTypes.bool.isRequired,
|
||||
})
|
||||
),
|
||||
};
|
||||
|
||||
export default StudyListTable;
|
||||
Reference in new issue
Block a user