UNPKG

841 BJavaScriptView Raw
1import { __rest } from "tslib";
2import * as React from 'react';
3import { useState } from 'react';
4import { InternalFormFieldGroup } from './InternalFormFieldGroup';
5export const FormFieldGroupExpandable = (_a) => {
6 var { children, className, header, isExpanded = false, toggleAriaLabel } = _a, props = __rest(_a, ["children", "className", "header", "isExpanded", "toggleAriaLabel"]);
7 const [localIsExpanded, setIsExpanded] = useState(isExpanded);
8 return (React.createElement(InternalFormFieldGroup, Object.assign({ className: className, header: header, isExpandable: true, isExpanded: localIsExpanded, toggleAriaLabel: toggleAriaLabel, onToggle: () => setIsExpanded(!localIsExpanded) }, props), children));
9};
10FormFieldGroupExpandable.displayName = 'FormFieldGroupExpandable';
11//# sourceMappingURL=FormFieldGroupExpandable.js.map
\No newline at end of file