1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.FormFieldGroupExpandable = void 0;
|
4 | const tslib_1 = require("tslib");
|
5 | const React = tslib_1.__importStar(require("react"));
|
6 | const react_1 = require("react");
|
7 | const InternalFormFieldGroup_1 = require("./InternalFormFieldGroup");
|
8 | const FormFieldGroupExpandable = (_a) => {
|
9 | var { children, className, header, isExpanded = false, toggleAriaLabel } = _a, props = tslib_1.__rest(_a, ["children", "className", "header", "isExpanded", "toggleAriaLabel"]);
|
10 | const [localIsExpanded, setIsExpanded] = react_1.useState(isExpanded);
|
11 | return (React.createElement(InternalFormFieldGroup_1.InternalFormFieldGroup, Object.assign({ className: className, header: header, isExpandable: true, isExpanded: localIsExpanded, toggleAriaLabel: toggleAriaLabel, onToggle: () => setIsExpanded(!localIsExpanded) }, props), children));
|
12 | };
|
13 | exports.FormFieldGroupExpandable = FormFieldGroupExpandable;
|
14 | exports.FormFieldGroupExpandable.displayName = 'FormFieldGroupExpandable';
|
15 |
|
\ | No newline at end of file |