@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.
@@ -3200,16 +3200,9 @@ var css_248z$l = ".ycn-logo {\n display: flex;\n align-items: center;\n flex-
3200
3200
  styleInject(css_248z$l);
3201
3201
 
3202
3202
  const b$m = block('logo');
3203
- const Logo$1 = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href = '/', wrapper, onClick, }) => {
3203
+ const Logo$1 = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize = 15, href, wrapper, onClick, }) => {
3204
3204
  const { compact } = useAsideHeaderContext();
3205
- const hasClickHandler = typeof onClick === 'function';
3206
3205
  const hasWrapper = typeof wrapper === 'function';
3207
- const linkProps = hasClickHandler
3208
- ? {}
3209
- : {
3210
- target: '_self',
3211
- href,
3212
- };
3213
3206
  let buttonIcon;
3214
3207
  if (iconSrc) {
3215
3208
  buttonIcon = (React__default.createElement(Button.Icon, { className: iconClassName },
@@ -3218,7 +3211,7 @@ const Logo$1 = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize =
3218
3211
  else if (icon) {
3219
3212
  buttonIcon = React__default.createElement(Icon, { data: icon, size: iconSize, className: iconClassName });
3220
3213
  }
3221
- const button = (React__default.createElement(Button, Object.assign({ view: "flat", size: "l", className: b$m('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick }, linkProps), buttonIcon));
3214
+ const button = (React__default.createElement(Button, { view: "flat", size: "l", className: b$m('btn-logo'), component: hasWrapper ? 'span' : undefined, onClick: onClick, target: "_self", href: href }, buttonIcon));
3222
3215
  let logo;
3223
3216
  if (typeof text === 'function') {
3224
3217
  logo = text();
@@ -3229,7 +3222,7 @@ const Logo$1 = ({ text, icon, iconSrc, iconClassName, iconSize = 24, textSize =
3229
3222
  return (React__default.createElement("div", { className: b$m() },
3230
3223
  React__default.createElement("div", { className: b$m('logo-btn-place') }, hasWrapper ? wrapper(button, compact) : button),
3231
3224
  !compact &&
3232
- (hasWrapper ? (React__default.createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default.createElement("a", Object.assign({}, linkProps, { className: b$m('logo-link'), onClick: onClick }), logo)))));
3225
+ (hasWrapper ? (React__default.createElement("div", { onClick: onClick }, wrapper(logo, compact))) : (React__default.createElement("a", { href: href !== null && href !== void 0 ? href : '/', target: "_self", className: b$m('logo-link'), onClick: onClick }, logo)))));
3233
3226
  };
3234
3227
 
3235
3228
  /**