UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

98 lines (97 loc) 3.01 kB
/** * MSKCC DSM 2021, 2023 */ import PropTypes from 'prop-types'; import { TableHTMLAttributes } from 'react'; export interface DataTableSkeletonHeader { /** * Optionally specify header label */ header?: string; /** * 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; } declare const DataTableSkeleton: { ({ headers, rowCount, columnCount, zebra, compact, className, showHeader, showToolbar, ...rest }: { [x: string]: any; headers: any; rowCount: any; columnCount: any; zebra: any; compact: any; className: any; showHeader: any; showToolbar: any; }): JSX.Element; propTypes: { /** * Specify an optional className to add. */ className: PropTypes.Requireable<string>; /** * Specify the number of columns that you want to render in the skeleton state */ columnCount: PropTypes.Requireable<number>; /** * Optionally specify whether you want the Skeleton to be rendered as a * compact DataTable */ compact: PropTypes.Requireable<boolean>; /** * Optionally specify the displayed headers */ headers: PropTypes.Requireable<NonNullable<any[] | PropTypes.InferProps<{ key: PropTypes.Requireable<string>; }> | null | undefined>>; /** * Specify the number of rows that you want to render in the skeleton state */ rowCount: PropTypes.Requireable<number>; /** * Specify if the table header should be rendered as part of the skeleton. */ showHeader: PropTypes.Requireable<boolean>; /** * Specify if the table toolbar should be rendered as part of the skeleton. */ showToolbar: PropTypes.Requireable<boolean>; /** * Optionally specify whether you want the DataTable to be zebra striped */ zebra: PropTypes.Requireable<boolean>; }; }; export default DataTableSkeleton;