Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/Tabs/TabAction.js

raw
1 import { __rest } from "tslib";
2 import { jsx as _jsx } from "react/jsx-runtime";
3 import { forwardRef } from 'react';
4 import { css } from '@patternfly/react-styles';
5 import styles from '@patternfly/react-styles/css/components/Tabs/tabs.mjs';
6 import { Button } from '../Button';
7 import { getOUIAProps } from '../../helpers';
8 const TabActionBase = (_a) => {
9 var { children, className, onClick, isDisabled, 'aria-label': ariaLabel = 'Tab action', innerRef, ouiaId, ouiaSafe } = _a, props = __rest(_a, ["children", "className", "onClick", "isDisabled", 'aria-label', "innerRef", "ouiaId", "ouiaSafe"]);
10 return (_jsx("span", { className: css(styles.tabsItemAction, className), children: _jsx(Button, Object.assign({ ref: innerRef, type: "button", variant: "plain", "aria-label": ariaLabel, onClick: onClick, isDisabled: isDisabled, icon: _jsx("span", { className: css(styles.tabsItemActionIcon), children: children }) }, getOUIAProps(TabAction.displayName, ouiaId, ouiaSafe), props)) }));
11 };
12 export const TabAction = forwardRef((props, ref) => (_jsx(TabActionBase, Object.assign({}, props, { innerRef: ref }))));
13 TabAction.displayName = 'TabAction';
14 //# sourceMappingURL=TabAction.js.map