import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Tabs/tabs'; import { Button } from '../Button'; import { getOUIAProps, OUIAProps } from '../../helpers'; export interface TabActionProps extends Omit, 'ref' | 'type' | 'size'>, OUIAProps { /** Content rendered in the tab action */ children?: React.ReactNode; /** Additional classes added to the tab action span */ className?: string; /** Click callback for tab action button */ onClick?: (event: React.MouseEvent) => void; /** Flag indicating if the tab action is disabled */ isDisabled?: boolean; /** Accessible label for the tab action */ 'aria-label'?: string; /** @hide Callback for the section ref */ innerRef?: React.Ref; } const TabActionBase: React.FunctionComponent = ({ children, className, onClick, isDisabled, 'aria-label': ariaLabel = 'Tab action', innerRef, ouiaId, ouiaSafe, ...props }: TabActionProps) => (
} {...getOUIAProps(TabAction.displayName, ouiaId, ouiaSafe)} {...props} /> ); export const TabAction = React.forwardRef((props: TabActionProps, ref: React.Ref) => ( )); TabAction.displayName = 'TabAction';