@gravity-ui/navigation 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +3 -10
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +3 -10
- package/build/esm/index.js.map +1 -1
- package/package.json +1 -1
package/build/cjs/index.js
CHANGED
|
@@ -3227,16 +3227,9 @@ var css_248z$l = ".ycn-logo {\n display: flex;\n align-items: center;\n flex-
|
|
|
3227
3227
|
styleInject(css_248z$l);
|
|
3228
3228
|
|
|
3229
3229
|
const b$m = block('logo');
|
|
3230
|
-
const Logo$1 = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href
|
|
3230
|
+
const Logo$1 = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href, wrapper, onClick, }) => {
|
|
3231
3231
|
const { compact } = useAsideHeaderContext();
|
|
3232
|
-
const hasClickHandler = typeof onClick === 'function';
|
|
3233
3232
|
const hasWrapper = typeof wrapper === 'function';
|
|
3234
|
-
const linkProps = hasClickHandler
|
|
3235
|
-
? {}
|
|
3236
|
-
: {
|
|
3237
|
-
target: '_self',
|
|
3238
|
-
href,
|
|
3239
|
-
};
|
|
3240
3233
|
let buttonIcon;
|
|
3241
3234
|
if (iconSrc) {
|
|
3242
3235
|
buttonIcon = (React__default["default"].createElement(uikit.Button.Icon, { className: iconClassName },
|
|
@@ -3245,7 +3238,7 @@ const Logo$1 = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize =
|
|
|
3245
3238
|
else if (icon) {
|
|
3246
3239
|
buttonIcon = React__default["default"].createElement(uikit.Icon, { data: icon, size: iconSize, className: iconClassName });
|
|
3247
3240
|
}
|
|
3248
|
-
const button = (React__default["default"].createElement(uikit.Button,
|
|
3241
|
+
const button = (React__default["default"].createElement(uikit.Button, { view: "flat", size: "l", className: b$m('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick, target: "_self", href: href }, buttonIcon));
|
|
3249
3242
|
let logo;
|
|
3250
3243
|
if (typeof text === 'function') {
|
|
3251
3244
|
logo = text();
|
|
@@ -3256,7 +3249,7 @@ const Logo$1 = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize =
|
|
|
3256
3249
|
return (React__default["default"].createElement("div", { className: b$m() },
|
|
3257
3250
|
React__default["default"].createElement("div", { className: b$m('logo-btn-place') }, hasWrapper ? wrapper(button, compact) : button),
|
|
3258
3251
|
!compact &&
|
|
3259
|
-
(hasWrapper ? (React__default["default"].createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default["default"].createElement("a",
|
|
3252
|
+
(hasWrapper ? (React__default["default"].createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default["default"].createElement("a", { href: href !== null && href !== void 0 ? href : '/', target: "_self", className: b$m('logo-link'), onClick: onClick }, logo)))));
|
|
3260
3253
|
};
|
|
3261
3254
|
|
|
3262
3255
|
/**
|