1 | import * as React from 'react';
|
2 | import { PickOptional } from '../../helpers/typeUtils';
|
3 | export interface ExpandableSectionProps extends React.HTMLProps<HTMLDivElement> {
|
4 | /** Content rendered inside the Expandable Component */
|
5 | children?: React.ReactNode;
|
6 | /** Additional classes added to the Expandable Component */
|
7 | className?: string;
|
8 | /** Flag to indicate if the content is expanded */
|
9 | isExpanded?: boolean;
|
10 | /** Text that appears in the attached toggle */
|
11 | toggleText?: string;
|
12 | /** Text that appears in the attached toggle when expanded (will override toggleText if both are specified; used for uncontrolled expandable with dynamic toggle text) */
|
13 | toggleTextExpanded?: string;
|
14 | /** Text that appears in the attached toggle when collapsed (will override toggleText if both are specified; used for uncontrolled expandable with dynamic toggle text) */
|
15 | toggleTextCollapsed?: string;
|
16 | /** React node that appears in the attached toggle in place of toggle text */
|
17 | toggleContent?: React.ReactNode;
|
18 | /** Callback function to toggle the expandable content. Detached expandable sections should use the onToggle property of ExpandableSectionToggle. */
|
19 | onToggle?: (isExpanded: boolean) => void;
|
20 | /** Forces active state */
|
21 | isActive?: boolean;
|
22 | /** Indicates the expandable section has a detached toggle */
|
23 | isDetached?: boolean;
|
24 | /** ID of the content of the expandable section */
|
25 | contentId?: string;
|
26 | /** Display size variant. Set to large for disclosure styling. */
|
27 | displaySize?: 'default' | 'large';
|
28 | /** Flag to indicate the width of the component is limited. Set to true for disclosure styling. */
|
29 | isWidthLimited?: boolean;
|
30 | /** Flag to indicate if the content is indented */
|
31 | isIndented?: boolean;
|
32 | }
|
33 | interface ExpandableSectionState {
|
34 | isExpanded: boolean;
|
35 | }
|
36 | export declare class ExpandableSection extends React.Component<ExpandableSectionProps, ExpandableSectionState> {
|
37 | static displayName: string;
|
38 | constructor(props: ExpandableSectionProps);
|
39 | static defaultProps: PickOptional<ExpandableSectionProps>;
|
40 | private calculateToggleText;
|
41 | render(): JSX.Element;
|
42 | }
|
43 | export {};
|
44 | //# sourceMappingURL=ExpandableSection.d.ts.map |
\ | No newline at end of file |