Debian Codegraph @

node/@patternfly/react-table/dist/esm/components/Table/Th.d.ts

raw
1 /// <reference types="react" />
2 import { ThInfoType, ThSelectType, ThExpandType, ThSortType } from './base/types';
3 import { TooltipProps } from '@patternfly/react-core/dist/esm/components/Tooltip';
4 import { BaseCellProps } from './Table';
5 export interface ThProps extends BaseCellProps, Omit<React.HTMLProps<HTMLTableHeaderCellElement>, 'onSelect' | 'width'> {
6 /**
7 * The column header the cell corresponds to. Applicable when this component is used as a direct child to <Tr>.
8 * This attribute replaces table header in mobile viewport. It is rendered by ::before pseudo element.
9 */
10 dataLabel?: string;
11 /** Renders a checkbox select so that all row checkboxes can be selected/deselected */
12 select?: ThSelectType;
13 /** Renders a chevron so that all row chevrons can be expanded/collapsed */
14 expand?: ThExpandType;
15 /** Formats the header so that its column will be sortable */
16 sort?: ThSortType;
17 /**
18 * Tooltip to show on the header cell.
19 * Note: If the header cell is truncated and has simple string content, it will already attempt to display the header text.
20 * If you want to show a tooltip that differs from the header text, you can set it here.
21 * To disable it completely you can set it to null.
22 */
23 tooltip?: React.ReactNode;
24 /** other props to pass to the tooltip */
25 tooltipProps?: Omit<TooltipProps, 'content'>;
26 /** Callback on mouse enter */
27 onMouseEnter?: (event: any) => void;
28 /** Adds tooltip/popover info button */
29 info?: ThInfoType;
30 /** Adds scope to the column to associate header cells with data cells*/
31 scope?: string;
32 /** Indicates the header column should be sticky */
33 isStickyColumn?: boolean;
34 /** Adds a border to the right side of the cell */
35 hasRightBorder?: boolean;
36 /** Adds a border to the left side of the cell */
37 hasLeftBorder?: boolean;
38 /** Minimum width for a sticky column */
39 stickyMinWidth?: string;
40 /** Left offset of a sticky column. This will typically be equal to the combined value set by stickyMinWidth of any sticky columns that precede the current sticky column. */
41 stickyLeftOffset?: string;
42 /** Right offset of a sticky column. This will typically be equal to the combined value set by stickyMinWidth of any sticky columns that come after the current sticky column. */
43 stickyRightOffset?: string;
44 /** Indicates the <th> is part of a subheader of a nested header */
45 isSubheader?: boolean;
46 /** Visually hidden text accessible only via assistive technologies. This must be passed in if the
47 * th is intended to be visually empty, and must be conveyed as a column header text.
48 */
49 screenReaderText?: string;
50 /** Provides an accessible name to the th. This should only be passed in when the th contains only non-text
51 * content, such as a "select all" checkbox or "expand all" toggle.
52 */
53 'aria-label'?: string;
54 /** @hide Beta prop, internal use only. Additional content to render in the column header, appended to the end of the header content. */
55 additionalContent?: React.ReactNode;
56 }
57 export declare const Th: import("react").ForwardRefExoticComponent<Omit<ThProps, "ref"> & import("react").RefAttributes<HTMLTableHeaderCellElement>>;
58 //# sourceMappingURL=Th.d.ts.map