yootd 0.0.58 → 0.0.59

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.
@@ -23,7 +23,7 @@ export var DownIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
23
23
  id: "union",
24
24
  d: "M12.46 6.4603L11.5407 5.54106L8.00034 9.08144L4.45996 5.54106L3.54072 6.4603L8.00034 10.9199L12.46 6.4603Z",
25
25
  fill: "black",
26
- "fill-opacity": "0.45"
26
+ fillOpacity: "0.45"
27
27
  })));
28
28
  });
29
29
  DownIcon.displayName = 'DownIcon';
@@ -1,5 +1,6 @@
1
+ import { MenuProps } from 'antd';
1
2
  import React from 'react';
2
3
  import './index.scss';
3
4
  export declare const Export: React.FC<{
4
- onChange?: (key: string) => void;
5
+ items?: MenuProps['items'];
5
6
  }>;
@@ -11,27 +11,22 @@ import { DownIcon } from "./components/DownIcon";
11
11
  import { UpIcon } from "./components/UpIcon";
12
12
  import "./index.scss";
13
13
  export var Export = function Export(_ref) {
14
- var onChange = _ref.onChange;
14
+ var _ref$items = _ref.items,
15
+ items = _ref$items === void 0 ? [{
16
+ label: '导入',
17
+ key: '1'
18
+ }, {
19
+ label: '下载模板',
20
+ key: '2'
21
+ }] : _ref$items;
15
22
  var mb = useBem('export');
16
23
  // 当前菜单展开状态
17
24
  var _useState = useState(false),
18
25
  _useState2 = _slicedToArray(_useState, 2),
19
26
  open = _useState2[0],
20
27
  setOpen = _useState2[1];
21
- var items = [{
22
- label: '导入',
23
- key: '1'
24
- }, {
25
- label: '下载模板',
26
- key: '2'
27
- }];
28
- // 点击事件
29
- var handleMenuClick = function handleMenuClick(e) {
30
- onChange === null || onChange === void 0 || onChange(e.key);
31
- };
32
28
  var menuProps = {
33
- items: items,
34
- onClick: handleMenuClick
29
+ items: items
35
30
  };
36
31
  return /*#__PURE__*/React.createElement(Dropdown.Button, {
37
32
  menu: menuProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yootd",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",