@antv/dumi-theme-antv 0.3.12 → 0.3.13

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.
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * Index 路由下的入口
4
4
  * - 获取数据
5
5
  * - 组合 slots 下的木偶组件
6
6
  */
7
- export declare const Index: () => JSX.Element;
7
+ export declare const Index: () => React.JSX.Element;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * 404 页面
4
4
  */
5
- declare const NotFound: () => JSX.Element;
5
+ declare const NotFound: () => React.JSX.Element;
6
6
  export default NotFound;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * Examples 页面
4
4
  *
5
5
  * @author YuZhanglong <loveyzl1123@gmail.com>
6
6
  */
7
- declare const Example: () => JSX.Element;
7
+ declare const Example: () => React.JSX.Element;
8
8
  export default Example;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const NotFound: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const NotFound: () => React.JSX.Element;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * Header.LOGO
4
4
  */
5
5
  export declare const Logo: ({ style }: {
6
6
  style: any;
7
- }) => JSX.Element;
7
+ }) => React.JSX.Element;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * Header.LogoWhite
4
4
  */
5
5
  export declare const LogoWhite: ({ style }: {
6
6
  style: any;
7
- }) => JSX.Element;
7
+ }) => React.JSX.Element;
@@ -4,6 +4,7 @@ declare type dropdownItem = {
4
4
  [key: string]: string;
5
5
  };
6
6
  url: string;
7
+ target?: '_blank';
7
8
  };
8
9
  export declare type INav = {
9
10
  slug?: string;
@@ -37,14 +37,18 @@ export var Navs = function Navs(_ref) {
37
37
  placement: "bottom",
38
38
  overlay: /*#__PURE__*/React.createElement(Menu, null, nav.dropdownItems.map(function (_ref2) {
39
39
  var name = _ref2.name,
40
- url = _ref2.url;
40
+ url = _ref2.url,
41
+ target = _ref2.target;
42
+ var displayName = name[locale.id];
41
43
  return /*#__PURE__*/React.createElement(Menu.Item, {
42
44
  key: url
43
- }, /*#__PURE__*/React.createElement("a", {
45
+ }, target === '_blank' || url.startsWith('http') ? /*#__PURE__*/React.createElement("a", {
46
+ href: url,
44
47
  target: "_blank",
45
- rel: "noreferrer",
46
- href: url
47
- }, name[locale.id], " ", /*#__PURE__*/React.createElement(LinkOutlined, null)));
48
+ rel: "noreferrer"
49
+ }, displayName, /*#__PURE__*/React.createElement(LinkOutlined, null)) : /*#__PURE__*/React.createElement(Link, {
50
+ to: url
51
+ }, displayName));
48
52
  }))
49
53
  }, /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(DownOutlined, null)))) : /*#__PURE__*/React.createElement("li", {
50
54
  key: title,
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const Search: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const Search: () => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/dumi-theme-antv",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "AntV website theme based on dumi2.",
5
5
  "types": "dist/types.d.ts",
6
6
  "scripts": {