| 1 |
"use strict"; |
| 2 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 3 |
exports.CollapseColumn = void 0; |
| 4 |
const tslib_1 = require("tslib"); |
| 5 |
const jsx_runtime_1 = require("react/jsx-runtime"); |
| 6 |
const react_1 = require("react"); |
| 7 |
const rh_microns_caret_down_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/rh-microns-caret-down-icon')); |
| 8 |
const react_styles_1 = require("@patternfly/react-styles"); |
| 9 |
const Button_1 = require('@patternfly/react-core/dist/js/components/Button'); |
| 10 |
const table_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Table/table")); |
| 11 |
const CollapseColumn = (_a) => { |
| 12 |
var { className = '', children = null, isOpen, onToggle, variant } = _a, props = tslib_1.__rest(_a, ["className", "children", "isOpen", "onToggle", "variant"]); |
| 13 |
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [isOpen !== undefined && ((0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ className: (0, react_styles_1.css)(className, isOpen && table_1.default.modifiers.expanded), size: variant === 'compact' ? 'sm' : undefined }, props, { variant: "plain", "aria-label": props['aria-label'] || 'Details', onClick: onToggle, "aria-expanded": isOpen, icon: (0, jsx_runtime_1.jsx)("div", { className: (0, react_styles_1.css)(table_1.default.tableToggleIcon), children: (0, jsx_runtime_1.jsx)(rh_microns_caret_down_icon_1.default, {}) }) }))), children] })); |
| 14 |
}; |
| 15 |
exports.CollapseColumn = CollapseColumn; |
| 16 |
exports.CollapseColumn.displayName = 'CollapseColumn'; |
| 17 |
//# sourceMappingURL=CollapseColumn.js.map |