Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/Masthead/Masthead.js

raw
1 import { __rest } from "tslib";
2 import { jsx as _jsx } from "react/jsx-runtime";
3 import { useContext } from 'react';
4 import styles from '@patternfly/react-styles/css/components/Masthead/masthead.mjs';
5 import { css } from '@patternfly/react-styles';
6 import { formatBreakpointMods } from '../../helpers/util';
7 import { PageContext } from '../Page/PageContext';
8 export const Masthead = (_a) => {
9 var { children, className, display = {
10 md: 'inline'
11 }, inset, variant = 'default' } = _a, props = __rest(_a, ["children", "className", "display", "inset", "variant"]);
12 const { width, getBreakpoint } = useContext(PageContext);
13 return (_jsx("header", Object.assign({ className: css(styles.masthead, variant === 'docked' && styles.modifiers.docked, formatBreakpointMods(display, styles, 'display-', getBreakpoint(width)), formatBreakpointMods(inset, styles, '', getBreakpoint(width)), className) }, props, { children: children })));
14 };
15 Masthead.displayName = 'Masthead';
16 //# sourceMappingURL=Masthead.js.map