import React, { useContext } from 'react'; import TableContext from './TableContext'; import { Skeleton } from 'components'; /** * Table header cell. */ function TableHeaderCell({ column }) { const { skeletonWidthMax = 100, skeletonWidthMin = 40 } = column; return (
); } /** * Table skeleton rows. */ export default function TableSkeletonRows({}) { const { table: { headerGroups }, } = useContext(TableContext); const skeletonRows = 10; return Array.from({ length: skeletonRows }).map(() => { return headerGroups.map((headerGroup) => (
{headerGroup.headers.map((column) => ( ))}
)); }); }