revdev-components 0.171.0 → 0.172.0

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.
@@ -11,6 +11,7 @@ export interface RegularDialogProps {
11
11
  width?: number;
12
12
  okText?: string;
13
13
  cancelText?: string;
14
+ cancelHide?: boolean;
14
15
  footerClassName?: string;
15
16
  contentClassName?: string;
16
17
  okHide?: boolean;
package/build/index.js CHANGED
@@ -5206,7 +5206,7 @@ var InfoDialog = function (_a) {
5206
5206
  var s$i = {"root":"index-module_root__BQI-i","header":"index-module_header__OUCQj","title":"index-module_title__HPbDC","close":"index-module_close__-FN6K","content":"index-module_content__BpXha","footer":"index-module_footer__xqKte"};
5207
5207
 
5208
5208
  var RegularDialog = function (_a) {
5209
- var titleIcon = _a.titleIcon, titlePrefix = _a.titlePrefix, title = _a.title, children = _a.children, _b = _a.hideFooter, hideFooter = _b === void 0 ? false : _b, className = _a.className, width = _a.width, okText = _a.okText, cancelText = _a.cancelText, footerClassName = _a.footerClassName, contentClassName = _a.contentClassName, okHide = _a.okHide, okDisabled = _a.okDisabled, okLoading = _a.okLoading, onOk = _a.onOk, onClose = _a.onClose, _c = _a.open, open = _c === void 0 ? true : _c, _d = _a.maskClosable, maskClosable = _d === void 0 ? false : _d;
5209
+ var titleIcon = _a.titleIcon, titlePrefix = _a.titlePrefix, title = _a.title, children = _a.children, _b = _a.hideFooter, hideFooter = _b === void 0 ? false : _b, className = _a.className, width = _a.width, okText = _a.okText, cancelText = _a.cancelText, cancelHide = _a.cancelHide, footerClassName = _a.footerClassName, contentClassName = _a.contentClassName, okHide = _a.okHide, okDisabled = _a.okDisabled, okLoading = _a.okLoading, onOk = _a.onOk, onClose = _a.onClose, _c = _a.open, open = _c === void 0 ? true : _c, _d = _a.maskClosable, maskClosable = _d === void 0 ? false : _d;
5210
5210
  var close = React.useMemo(function () {
5211
5211
  return React.createElement(RegularIcon, { name: "cross", className: s$i.close, onClick: onClose });
5212
5212
  }, [onClose]);
@@ -5233,11 +5233,12 @@ var RegularDialog = function (_a) {
5233
5233
  }
5234
5234
  return result;
5235
5235
  }, [width]);
5236
+ var hideBottom = hideFooter || (cancelHide && okHide);
5236
5237
  return (React.createElement(antd.Modal, { open: open, onCancel: onClose, style: style, className: classNames(s$i.root, className), maskClosable: maskClosable, footer: null },
5237
5238
  titleContent,
5238
5239
  React.createElement("div", { className: classNames(s$i.content, contentClassName) }, children),
5239
- hideFooter ? null : (React.createElement("div", { className: classNames(s$i.footer, footerClassName) },
5240
- React.createElement(antd.Button, { onClick: onClose }, cancelText || "Cancel"),
5240
+ hideBottom ? null : (React.createElement("div", { className: classNames(s$i.footer, footerClassName) },
5241
+ cancelHide ? null : React.createElement(antd.Button, { onClick: onClose }, cancelText || "Cancel"),
5241
5242
  okHide ? null : (React.createElement(antd.Button, { type: "primary", onClick: onOk, disabled: okDisabled, loading: okLoading }, okText || "OK"))))));
5242
5243
  };
5243
5244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.171.0",
3
+ "version": "0.172.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {