Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts

raw
1 /// <reference types="react" />
2 /** Acts as the toggle sub-component when the main expandable section component has the isDetached
3 * property passed in. Allows for more custom control over the expandable section's toggle.
4 */
5 export interface ExpandableSectionToggleProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onToggle'> {
6 /** Content rendered inside the expandable toggle. */
7 children?: React.ReactNode;
8 /** Additional classes added to the expandable toggle. */
9 className?: string;
10 /** Id of the toggle's respective expandable section content. The value passed into this
11 * property should match the contentId property of the main expandable section component.
12 */
13 contentId?: string;
14 /** Id of the toggle. The value passed into this property should match the aria-labelledby
15 * property of the main expandable section component.
16 */
17 toggleId?: string;
18 /** Direction the toggle arrow should point when the expandable section is expanded. */
19 direction?: 'up' | 'down';
20 /** Flag to determine toggle styling when the expandable content is truncated. */
21 hasTruncatedContent?: boolean;
22 /** Flag indicating if the expandable section is expanded. */
23 isExpanded?: boolean;
24 /** Callback function to toggle the expandable content. */
25 onToggle?: (isExpanded: boolean) => void;
26 /** Flag indicating that the expandable section and expandable toggle are detached from one another. */
27 isDetached?: boolean;
28 /** Accessible name via human readable string for the expandable section toggle. */
29 toggleAriaLabel?: string;
30 /** Accessible name via space delimtted list of IDs for the expandable section toggle. */
31 toggleAriaLabelledBy?: string;
32 /** The HTML element to use for the toggle wrapper. Can be 'div' (default) or any heading level.
33 * When using heading elements, the button will be rendered inside the heading for proper semantics.
34 * This is useful when the toggle text should function as a heading in the document structure.
35 */
36 toggleWrapper?: 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
37 }
38 export declare const ExpandableSectionToggle: React.FunctionComponent<ExpandableSectionToggleProps>;
39 //# sourceMappingURL=ExpandableSectionToggle.d.ts.map