Debian Codegraph @

node/@patternfly/react-core/src/components/Popover/PopoverHeaderText.tsx

raw
1 import { css } from '@patternfly/react-styles';
2 import styles from '@patternfly/react-styles/css/components/Popover/popover';
3
4 export interface PopoverHeaderTextProps extends React.HTMLProps<HTMLDivElement> {
5 /** Content of the header text */
6 children: React.ReactNode;
7 /** Class to be applied to the header text */
8 className?: string;
9 /** Heading level of the header title */
10 headingLevel: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
11 }
12
13 export const PopoverHeaderText: React.FunctionComponent<PopoverHeaderTextProps> = ({
14 children,
15 className,
16 headingLevel,
17 ...props
18 }: PopoverHeaderTextProps) => {
19 const HeadingLevel = headingLevel;
20
21 return (
22 <HeadingLevel className={css(styles.popoverTitleText, className)} {...props}>
23 {children}
24 </HeadingLevel>
25 );
26 };
27 PopoverHeaderText.displayName = 'PopoverHeaderText';