Debian Codegraph @

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

raw
1 import { __rest } from "tslib";
2 import { jsx as _jsx } from "react/jsx-runtime";
3 import styles from '@patternfly/react-styles/css/components/Masthead/masthead.mjs';
4 import { css } from '@patternfly/react-styles';
5 export const MastheadLogo = (_a) => {
6 var { children, className, component, isCompact = false } = _a, props = __rest(_a, ["children", "className", "component", "isCompact"]);
7 let Component = component;
8 if (!component) {
9 if ((props === null || props === void 0 ? void 0 : props.href) !== undefined) {
10 Component = 'a';
11 }
12 else {
13 Component = 'span';
14 }
15 }
16 return (_jsx(Component, Object.assign({ className: css(styles.mastheadLogo, isCompact && styles.modifiers.compact, className) }, (Component === 'a' && { tabIndex: 0 }), props, { children: children })));
17 };
18 MastheadLogo.displayName = 'MastheadLogo';
19 //# sourceMappingURL=MastheadLogo.js.map