UNPKG

1.04 kBJavaScriptView Raw
1import { __rest } from "tslib";
2import * as React from 'react';
3import styles from '@patternfly/react-styles/css/components/Masthead/masthead';
4import { css } from '@patternfly/react-styles';
5import { formatBreakpointMods } from '../../helpers/util';
6import { PageContext } from '../Page/Page';
7export const Masthead = (_a) => {
8 var { children, className, backgroundColor = 'dark', display = {
9 md: 'inline'
10 }, inset } = _a, props = __rest(_a, ["children", "className", "backgroundColor", "display", "inset"]);
11 const { width, getBreakpoint } = React.useContext(PageContext);
12 return (React.createElement("header", Object.assign({ className: css(styles.masthead, formatBreakpointMods(display, styles, 'display-', getBreakpoint(width)), formatBreakpointMods(inset, styles, '', getBreakpoint(width)), backgroundColor === 'light' && styles.modifiers.light, backgroundColor === 'light200' && styles.modifiers.light_200, className) }, props), children));
13};
14Masthead.displayName = 'Masthead';
15//# sourceMappingURL=Masthead.js.map
\No newline at end of file