import { useRef } from 'react'; import styles from '@patternfly/react-styles/css/components/Compass/compass'; import { css } from '@patternfly/react-styles'; import { Button } from '../Button'; import { Tooltip } from '../Tooltip'; const CompassSearchIcon = () => ( ); export interface CompassNavSearchProps extends Omit, 'onClick'> { /** Content to display in the tooltip. Defaults to "Search". */ tooltipContent?: React.ReactNode; /** Click handler for the search button. */ onClick?: React.MouseEventHandler; /** Additional classes added to the nav search wrapper. */ className?: string; /** Accessible label for the nav search. */ 'aria-label'?: string; } export const CompassNavSearch: React.FunctionComponent = ({ 'aria-label': ariaLabel = 'Search', tooltipContent = 'Search', className, onClick, ...props }: CompassNavSearchProps) => { const buttonRef = useRef(null); return ( } aria-label={ariaLabel} onClick={onClick} ref={buttonRef} /> ); }; CompassNavSearch.displayName = 'CompassNavSearch';