yootd 0.2.16 → 0.2.17

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.
@@ -41,7 +41,8 @@ export var Aside = function Aside(_ref) {
41
41
  bottomThreshold = _ref$bottomThreshold === void 0 ? 50 : _ref$bottomThreshold,
42
42
  _ref$isSubNode = _ref.isSubNode,
43
43
  isSubNode = _ref$isSubNode === void 0 ? false : _ref$isSubNode,
44
- onSubClick = _ref.onSubClick;
44
+ onSubClick = _ref.onSubClick,
45
+ customBtn = _ref.customBtn;
45
46
  var mb = useBem('aside');
46
47
  var asideRef = useRef(null);
47
48
  // 当前选择的key
@@ -190,7 +191,7 @@ export var Aside = function Aside(_ref) {
190
191
  className: "".concat(mb.b('title'))
191
192
  }, /*#__PURE__*/React.createElement("span", {
192
193
  className: "".concat(mb.b('title').e('title-text'))
193
- }, title), /*#__PURE__*/React.createElement("div", {
194
+ }, title), customBtn != null ? customBtn : /*#__PURE__*/React.createElement("div", {
194
195
  className: "".concat(mb.b('title').e('add-btn-icon')),
195
196
  style: {
196
197
  display: addBtnIcon ? 'block' : 'none',
@@ -1,3 +1,4 @@
1
+ import { React } from 'react';
1
2
  type IdataItem = {
2
3
  key: string;
3
4
  title: string;
@@ -41,6 +42,7 @@ export type AsideProps = {
41
42
  bottomThreshold?: number;
42
43
  isSubNode?: boolean;
43
44
  onSubClick?: (key: string, subKey: string, e: IdataItem) => void;
45
+ customBtn?: React.ReactNode;
44
46
  };
45
47
  export type AsideItemProps = {
46
48
  activeKey: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yootd",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "基于 Antd 二次开发的组件库",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",