= ({
+ ouiaId = 'SkeletonTableHeader',
+ isSelectable,
+ isExpandable,
+ columnsCount,
+ columns,
+ isTreeTable,
+ ...rest
+}: SkeletonTableHeadProps) => {
+ const hasCustomColumns = Array.isArray(columns);
+ const rowCellsCount = hasCustomColumns ? columns.length : columnsCount;
+
+ const cells = useMemo(() => [
+ ...(isExpandable ? [ | ] : []),
+ ...(isSelectable && !isTreeTable ? [ | ] : []),
+ ...(hasCustomColumns ? (
+ columns.map((column, index) => (
+
+ {isThObject(column) ? column.cell : column}
+ |
+ ))
+ ) : (
+ [ ...Array(rowCellsCount) ].map((_, index) => (
+
+
+ |
+ ))
+ ))
+ ]
+ , [ hasCustomColumns, isExpandable, isSelectable, isTreeTable, columns, rowCellsCount, ouiaId ]);
+
+
+ return (
+
+
+ {cells}
+
+
+ );
+};
+
+export default SkeletonTableHead;
diff --git a/packages/module/src/SkeletonTableHead/__snapshots__/SkeletonTableHead.test.tsx.snap b/packages/module/src/SkeletonTableHead/__snapshots__/SkeletonTableHead.test.tsx.snap
new file mode 100644
index 00000000..93178b10
--- /dev/null
+++ b/packages/module/src/SkeletonTableHead/__snapshots__/SkeletonTableHead.test.tsx.snap
@@ -0,0 +1,205 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`SkeletonTableHead component should render correctly with count 1`] = `
+{
+ "asFragment": [Function],
+ "baseElement":
+
+
+
+
+
+ ,
+ "container":
+
+
+
+
,
+ "debug": [Function],
+ "findAllByAltText": [Function],
+ "findAllByDisplayValue": [Function],
+ "findAllByLabelText": [Function],
+ "findAllByPlaceholderText": [Function],
+ "findAllByRole": [Function],
+ "findAllByTestId": [Function],
+ "findAllByText": [Function],
+ "findAllByTitle": [Function],
+ "findByAltText": [Function],
+ "findByDisplayValue": [Function],
+ "findByLabelText": [Function],
+ "findByPlaceholderText": [Function],
+ "findByRole": [Function],
+ "findByTestId": [Function],
+ "findByText": [Function],
+ "findByTitle": [Function],
+ "getAllByAltText": [Function],
+ "getAllByDisplayValue": [Function],
+ "getAllByLabelText": [Function],
+ "getAllByPlaceholderText": [Function],
+ "getAllByRole": [Function],
+ "getAllByTestId": [Function],
+ "getAllByText": [Function],
+ "getAllByTitle": [Function],
+ "getByAltText": [Function],
+ "getByDisplayValue": [Function],
+ "getByLabelText": [Function],
+ "getByPlaceholderText": [Function],
+ "getByRole": [Function],
+ "getByTestId": [Function],
+ "getByText": [Function],
+ "getByTitle": [Function],
+ "queryAllByAltText": [Function],
+ "queryAllByDisplayValue": [Function],
+ "queryAllByLabelText": [Function],
+ "queryAllByPlaceholderText": [Function],
+ "queryAllByRole": [Function],
+ "queryAllByTestId": [Function],
+ "queryAllByText": [Function],
+ "queryAllByTitle": [Function],
+ "queryByAltText": [Function],
+ "queryByDisplayValue": [Function],
+ "queryByLabelText": [Function],
+ "queryByPlaceholderText": [Function],
+ "queryByRole": [Function],
+ "queryByTestId": [Function],
+ "queryByText": [Function],
+ "queryByTitle": [Function],
+ "rerender": [Function],
+ "unmount": [Function],
+}
+`;
+
+exports[`SkeletonTableHead component should render correctly with count 2`] = `
+{
+ "asFragment": [Function],
+ "baseElement":
+
+
+
+ |
+ First
+ |
+
+ Second
+ |
+
+
+
+ ,
+ "container":
+
+
+ |
+ First
+ |
+
+ Second
+ |
+
+
+
,
+ "debug": [Function],
+ "findAllByAltText": [Function],
+ "findAllByDisplayValue": [Function],
+ "findAllByLabelText": [Function],
+ "findAllByPlaceholderText": [Function],
+ "findAllByRole": [Function],
+ "findAllByTestId": [Function],
+ "findAllByText": [Function],
+ "findAllByTitle": [Function],
+ "findByAltText": [Function],
+ "findByDisplayValue": [Function],
+ "findByLabelText": [Function],
+ "findByPlaceholderText": [Function],
+ "findByRole": [Function],
+ "findByTestId": [Function],
+ "findByText": [Function],
+ "findByTitle": [Function],
+ "getAllByAltText": [Function],
+ "getAllByDisplayValue": [Function],
+ "getAllByLabelText": [Function],
+ "getAllByPlaceholderText": [Function],
+ "getAllByRole": [Function],
+ "getAllByTestId": [Function],
+ "getAllByText": [Function],
+ "getAllByTitle": [Function],
+ "getByAltText": [Function],
+ "getByDisplayValue": [Function],
+ "getByLabelText": [Function],
+ "getByPlaceholderText": [Function],
+ "getByRole": [Function],
+ "getByTestId": [Function],
+ "getByText": [Function],
+ "getByTitle": [Function],
+ "queryAllByAltText": [Function],
+ "queryAllByDisplayValue": [Function],
+ "queryAllByLabelText": [Function],
+ "queryAllByPlaceholderText": [Function],
+ "queryAllByRole": [Function],
+ "queryAllByTestId": [Function],
+ "queryAllByText": [Function],
+ "queryAllByTitle": [Function],
+ "queryByAltText": [Function],
+ "queryByDisplayValue": [Function],
+ "queryByLabelText": [Function],
+ "queryByPlaceholderText": [Function],
+ "queryByRole": [Function],
+ "queryByTestId": [Function],
+ "queryByText": [Function],
+ "queryByTitle": [Function],
+ "rerender": [Function],
+ "unmount": [Function],
+}
+`;
diff --git a/packages/module/src/SkeletonTableHead/index.ts b/packages/module/src/SkeletonTableHead/index.ts
new file mode 100644
index 00000000..eada2199
--- /dev/null
+++ b/packages/module/src/SkeletonTableHead/index.ts
@@ -0,0 +1,2 @@
+export { default } from './SkeletonTableHead';
+export * from './SkeletonTableHead';
diff --git a/packages/module/src/index.ts b/packages/module/src/index.ts
index 2f8003bb..2cb9f7c2 100644
--- a/packages/module/src/index.ts
+++ b/packages/module/src/index.ts
@@ -9,6 +9,12 @@ export * from './UnavailableContent';
export { default as TagCount } from './TagCount';
export * from './TagCount';
+export { default as SkeletonTableHead } from './SkeletonTableHead';
+export * from './SkeletonTableHead';
+
+export { default as SkeletonTableBody } from './SkeletonTableBody';
+export * from './SkeletonTableBody';
+
export { default as SkeletonTable } from './SkeletonTable';
export * from './SkeletonTable';