import type { Ref, FunctionComponent } from 'react'; import { forwardRef } from 'react'; import { Button, ButtonProps, Icon, Tooltip, TooltipProps } from '@patternfly/react-core'; import { CloseIcon } from '@patternfly/react-icons'; export interface ChatbotHeaderCloseButtonProps extends ButtonProps { /** Callback function for when button is clicked */ onClick: () => void; /** Custom classname for the header component */ className?: string; /** Props spread to the PF Tooltip component wrapping the display mode dropdown */ tooltipProps?: TooltipProps; /** Aria label for menu */ menuAriaLabel?: string; /** Ref applied to menu */ innerRef?: React.Ref; /** Content used in tooltip */ tooltipContent?: string; /** Sets button to compact styling. */ isCompact?: boolean; } const ChatbotHeaderCloseButtonBase: FunctionComponent = ({ className, onClick, tooltipProps, menuAriaLabel = 'Close', innerRef, tooltipContent = 'Close', isCompact, ...props }: ChatbotHeaderCloseButtonProps) => (
); export const ChatbotHeaderCloseButton = forwardRef( (props: ChatbotHeaderCloseButtonProps, ref: Ref) => ( ) );