@xqmsg/ui-core 0.18.7 → 0.18.8

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.
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  export interface NavigationMenuItemProps {
3
3
  leftIcon: JSX.Element;
4
4
  label: string;
5
+ to?: string;
5
6
  href?: string;
6
7
  isSelected: boolean;
7
8
  onClick: () => void;
@@ -3,6 +3,7 @@ export declare type GroupMenuItems = {
3
3
  leftIcon: JSX.Element;
4
4
  label: string;
5
5
  href?: string;
6
+ to?: string;
6
7
  rightIcon?: JSX.Element;
7
8
  isExternal?: boolean;
8
9
  };
@@ -10,6 +10,7 @@ var react = require('@chakra-ui/react');
10
10
  var reactHookForm = require('react-hook-form');
11
11
  var lodash = require('lodash');
12
12
  var icons = require('@chakra-ui/icons');
13
+ var reactRouterDom = require('react-router-dom');
13
14
  var hi = require('react-icons/hi');
14
15
  var provider = require('@chakra-ui/provider');
15
16
  var themeTools = require('@chakra-ui/theme-tools');
@@ -2863,22 +2864,31 @@ var NavigationMenuItem = function NavigationMenuItem(_ref) {
2863
2864
  var label = _ref.label,
2864
2865
  leftIcon = _ref.leftIcon,
2865
2866
  href = _ref.href,
2867
+ to = _ref.to,
2866
2868
  rightIcon = _ref.rightIcon,
2867
2869
  isExternal = _ref.isExternal,
2868
2870
  isSelected = _ref.isSelected,
2869
2871
  onClick = _ref.onClick;
2870
2872
  var additionalProps = {};
2873
+ var reactRouterLinkProps = {};
2874
+
2875
+ if (to) {
2876
+ reactRouterLinkProps = {
2877
+ to: to,
2878
+ as: reactRouterDom.Link
2879
+ };
2880
+ }
2871
2881
 
2872
2882
  if (isExternal) {
2873
2883
  additionalProps = _extends$6({}, additionalProps, {
2874
2884
  referrerPolicy: 'no-referrer',
2875
- target: '_blank'
2885
+ target: '_blank',
2886
+ href: href,
2887
+ isExternal: true
2876
2888
  });
2877
2889
  }
2878
2890
 
2879
- return /*#__PURE__*/React__default.createElement(react.Link, Object.assign({
2880
- href: href
2881
- }, additionalProps, {
2891
+ return /*#__PURE__*/React__default.createElement(react.Link, Object.assign({}, reactRouterLinkProps, additionalProps, {
2882
2892
  onClick: onClick,
2883
2893
  display: "flex",
2884
2894
  alignItems: "center",