Debian Codegraph @

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

raw
1 "use strict";
2 Object.defineProperty(exports, "__esModule", { value: true });
3 exports.MastheadLogo = void 0;
4 const tslib_1 = require("tslib");
5 const jsx_runtime_1 = require("react/jsx-runtime");
6 const masthead_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Masthead/masthead"));
7 const react_styles_1 = require("@patternfly/react-styles");
8 const MastheadLogo = (_a) => {
9 var { children, className, component, isCompact = false } = _a, props = tslib_1.__rest(_a, ["children", "className", "component", "isCompact"]);
10 let Component = component;
11 if (!component) {
12 if ((props === null || props === void 0 ? void 0 : props.href) !== undefined) {
13 Component = 'a';
14 }
15 else {
16 Component = 'span';
17 }
18 }
19 return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: (0, react_styles_1.css)(masthead_1.default.mastheadLogo, isCompact && masthead_1.default.modifiers.compact, className) }, (Component === 'a' && { tabIndex: 0 }), props, { children: children })));
20 };
21 exports.MastheadLogo = MastheadLogo;
22 exports.MastheadLogo.displayName = 'MastheadLogo';
23 //# sourceMappingURL=MastheadLogo.js.map