@carbon/react
Version:
React components for the Carbon Design System
55 lines (54 loc) • 1.6 kB
TypeScript
/**
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { type FunctionComponent, TableHTMLAttributes } from 'react';
export interface DataTableSkeletonHeader {
/**
* Specify header label
*/
header: React.ReactNode;
/**
* Optionally specify header key
*/
key?: string;
}
export interface DataTableSkeletonProps extends TableHTMLAttributes<HTMLTableElement> {
/**
* Specify the number of columns that you want to render in the skeleton state
*/
columnCount?: number;
/**
* Optionally specify whether you want the Skeleton to be rendered as a
* compact DataTable
*/
compact?: boolean;
/**
* Optionally specify the displayed headers
*/
headers?: DataTableSkeletonHeader[];
/**
* Specify the number of rows that you want to render in the skeleton state
*/
rowCount?: number;
/**
* Specify if the table header should be rendered as part of the skeleton.
*/
showHeader?: boolean;
/**
* Specify if the table toolbar should be rendered as part of the skeleton.
*/
showToolbar?: boolean;
/**
* Optionally specify whether you want the DataTable to be zebra striped
*/
zebra?: boolean;
/**
* Optionally specify whether you want the DataTable to be styled
*/
className?: string;
}
declare const DataTableSkeleton: FunctionComponent<DataTableSkeletonProps>;
export default DataTableSkeleton;