| 1 |
import { forwardRef } from 'react'; |
| 2 |
import { css } from '@patternfly/react-styles'; |
| 3 |
import styles from '@patternfly/react-styles/css/components/Menu/menu'; |
| 4 |
|
| 5 |
export interface MenuSearchInputProps extends React.HTMLProps<HTMLElement> { |
| 6 |
/** Items within input */ |
| 7 |
children?: React.ReactNode; |
| 8 |
/** @hide Forwarded ref */ |
| 9 |
innerRef?: React.Ref<any>; |
| 10 |
} |
| 11 |
|
| 12 |
export const MenuSearchInput = forwardRef((props: MenuSearchInputProps, ref: React.Ref<HTMLDivElement>) => ( |
| 13 |
// Update to use the styles object when core adds the class |
| 14 |
<div {...props} className={css(`${styles.menuSearch}-input`, props.className)} ref={ref} /> |
| 15 |
)); |
| 16 |
MenuSearchInput.displayName = 'MenuSearchInput'; |