feat: implement EmptyTable component

This commit is contained in:
Sérgio Salgado 2021-02-12 18:32:37 +00:00 committed by Josh Harvey
parent 48c8d808b0
commit 00e820191f
5 changed files with 42 additions and 7 deletions

View file

@ -17,10 +17,10 @@ import {
Td,
Th
} from 'src/components/fake-table/Table'
import { EmptyTable } from 'src/components/table'
import { H4 } from 'src/components/typography'
import { ReactComponent as ExpandClosedIcon } from 'src/styling/icons/action/expand/closed.svg'
import { ReactComponent as ExpandOpenIcon } from 'src/styling/icons/action/expand/open.svg'
import { ReactComponent as EmptyTableIcon } from 'src/styling/icons/table/empty-table.svg'
import styles from './DataTable.styles'
@ -168,12 +168,7 @@ const DataTable = ({
</THead>
<TBody className={classes.body}>
{loading && <H4>Loading...</H4>}
{!loading && R.isEmpty(data) && (
<div className={classes.emptyTable}>
<EmptyTableIcon />
<H4>{emptyText}</H4>
</div>
)}
{!loading && R.isEmpty(data) && <EmptyTable message={emptyText} />}
<AutoSizer disableWidth>
{({ height }) => (
<List