UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

77 lines (76 loc) 2.69 kB
/** * MSKCC DSM 2021, 2023 */ import { PropsWithChildren } from 'react'; import PropTypes from 'prop-types'; interface TableProps { experimentalAutoAlign?: boolean; className?: string; /** * `false` If true, will apply sorting styles */ isSortable?: boolean; /** * Specify whether the overflow menu (if it exists) should be shown always, or only on hover */ overflowMenuOnHover?: boolean; /** * Change the row height of table. Currently supports `xs`, `sm`, `md`, `lg`, and `xl`. */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; /** * `false` If true, will keep the header sticky (only data rows will scroll) */ stickyHeader?: boolean; /** * `false` If true, will use a width of 'auto' instead of 100% */ useStaticWidth?: boolean; /** * `true` to add useZebraStyles striping. */ useZebraStyles?: boolean; } export declare const Table: { ({ className, children, useZebraStyles, size, isSortable, useStaticWidth, stickyHeader, overflowMenuOnHover, experimentalAutoAlign, ...other }: PropsWithChildren<TableProps>): JSX.Element; propTypes: { /** * Pass in the children that will be rendered within the Table */ children: PropTypes.Requireable<PropTypes.ReactNodeLike>; className: PropTypes.Requireable<string>; /** * Experimental property. Allows table to align cell contents to the top if there is text wrapping in the content. Might have performance issues, intended for smaller tables */ experimentalAutoAlign: PropTypes.Requireable<boolean>; /** * `false` If true, will apply sorting styles */ isSortable: PropTypes.Requireable<boolean>; /** * Specify whether the overflow menu (if it exists) should be shown always, or only on hover */ overflowMenuOnHover: PropTypes.Requireable<boolean>; /** * Change the row height of table. Currently supports `xs`, `sm`, `md`, `lg`, and `xl`. */ size: PropTypes.Requireable<string>; /** * `false` If true, will keep the header sticky (only data rows will scroll) */ stickyHeader: PropTypes.Requireable<boolean>; /** * `false` If true, will use a width of 'auto' instead of 100% */ useStaticWidth: PropTypes.Requireable<boolean>; /** * `true` to add useZebraStyles striping. */ useZebraStyles: PropTypes.Requireable<boolean>; }; defaultProps: { isSortable: boolean; overflowMenuOnHover: boolean; }; }; export default Table;