| 1 |
import { css } from '@patternfly/react-styles'; |
| 2 |
import styles from '@patternfly/react-styles/css/components/Popover/popover'; |
| 3 |
|
| 4 |
export interface PopoverHeaderIconProps extends React.HTMLProps<HTMLSpanElement> { |
| 5 |
/** Content of the header icon */ |
| 6 |
children: React.ReactNode; |
| 7 |
/** Class to be applied to the header icon */ |
| 8 |
className?: string; |
| 9 |
} |
| 10 |
|
| 11 |
export const PopoverHeaderIcon: React.FunctionComponent<PopoverHeaderIconProps> = ({ |
| 12 |
children, |
| 13 |
className, |
| 14 |
...props |
| 15 |
}: PopoverHeaderIconProps) => ( |
| 16 |
<span className={css(styles.popoverTitleIcon, className)} {...props}> |
| 17 |
{children} |
| 18 |
</span> |
| 19 |
); |
| 20 |
PopoverHeaderIcon.displayName = 'PopoverHeaderIcon'; |