| 1 |
"use strict"; |
| 2 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 3 |
exports.TabAction = 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 react_styles_1 = require("@patternfly/react-styles"); |
| 8 |
const tabs_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Tabs/tabs")); |
| 9 |
const Button_1 = require("../Button"); |
| 10 |
const helpers_1 = require("../../helpers"); |
| 11 |
const TabActionBase = (_a) => { |
| 12 |
var { children, className, onClick, isDisabled, 'aria-label': ariaLabel = 'Tab action', innerRef, ouiaId, ouiaSafe } = _a, props = tslib_1.__rest(_a, ["children", "className", "onClick", "isDisabled", 'aria-label', "innerRef", "ouiaId", "ouiaSafe"]); |
| 13 |
return ((0, jsx_runtime_1.jsx)("span", { className: (0, react_styles_1.css)(tabs_1.default.tabsItemAction, className), children: (0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ ref: innerRef, type: "button", variant: "plain", "aria-label": ariaLabel, onClick: onClick, isDisabled: isDisabled, icon: (0, jsx_runtime_1.jsx)("span", { className: (0, react_styles_1.css)(tabs_1.default.tabsItemActionIcon), children: children }) }, (0, helpers_1.getOUIAProps)(exports.TabAction.displayName, ouiaId, ouiaSafe), props)) })); |
| 14 |
}; |
| 15 |
exports.TabAction = (0, react_1.forwardRef)((props, ref) => ((0, jsx_runtime_1.jsx)(TabActionBase, Object.assign({}, props, { innerRef: ref })))); |
| 16 |
exports.TabAction.displayName = 'TabAction'; |
| 17 |
//# sourceMappingURL=TabAction.js.map |