Debian Codegraph @

node/@patternfly/react-core/src/components/LoginPage/LoginMainHeader.tsx

raw
1 import { Title, TitleSizes } from '../Title';
2 import { css } from '@patternfly/react-styles';
3 import styles from '@patternfly/react-styles/css/components/Login/login';
4
5 export interface LoginMainHeaderProps extends React.HTMLProps<HTMLDivElement> {
6 /** Content rendered inside the login main header */
7 children?: React.ReactNode;
8 /** Additional classes added to the login main header */
9 className?: string;
10 /** Title for the login main header */
11 title?: string;
12 /** Subtitle that contains the text, URL, and URL text for the login main header */
13 subtitle?: string;
14 /** Actions that render for the login main header */
15 headerUtilities?: React.ReactNode;
16 }
17
18 export const LoginMainHeader: React.FunctionComponent<LoginMainHeaderProps> = ({
19 children = null,
20 className = '',
21 title = '',
22 subtitle = '',
23 headerUtilities = null,
24 ...props
25 }: LoginMainHeaderProps) => (
26 <div className={css(styles.loginMainHeader, className)} {...props}>
27 {title && (
28 <Title headingLevel="h2" size={TitleSizes['3xl']}>
29 {title}
30 </Title>
31 )}
32 {subtitle && <p className={css(styles.loginMainHeaderDesc)}>{subtitle}</p>}
33 {headerUtilities && <div className={css(styles.loginMainHeaderUtilities)}>{headerUtilities}</div>}
34 {children}
35 </div>
36 );
37 LoginMainHeader.displayName = 'LoginMainHeader';