Debian Codegraph @

node/@patternfly/react-core/src/components/Tabs/TabTitleIcon.tsx

raw
1 import { css } from '@patternfly/react-styles';
2 import styles from '@patternfly/react-styles/css/components/Tabs/tabs';
3
4 export interface TabTitleIconProps extends React.HTMLProps<HTMLSpanElement> {
5 /** Icon to be rendered inside the tab button title. */
6 children: React.ReactNode;
7 /** additional classes added to the tab title icon */
8 className?: string;
9 }
10
11 export const TabTitleIcon: React.FunctionComponent<TabTitleIconProps> = ({
12 children,
13 className = '',
14 ...props
15 }: TabTitleIconProps) => (
16 <span className={css(`${styles.tabs}__item-icon`, className)} {...props}>
17 {children}
18 </span>
19 );
20 TabTitleIcon.displayName = 'TabTitleIcon';