ywana-core8 0.0.788 → 0.0.789

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.
@@ -4345,6 +4345,7 @@ var UploadDialog = function UploadDialog(_ref) {
4345
4345
  children = _ref.children,
4346
4346
  className = _ref.className,
4347
4347
  disabled = _ref.disabled,
4348
+ onCanClose = _ref.onCanClose,
4348
4349
  _ref$overlayCanClose = _ref.overlayCanClose,
4349
4350
  overlayCanClose = _ref$overlayCanClose === void 0 ? true : _ref$overlayCanClose;
4350
4351
  var site = useContext(SiteContext);
@@ -4364,11 +4365,16 @@ var UploadDialog = function UploadDialog(_ref) {
4364
4365
  }
4365
4366
  }
4366
4367
 
4368
+ function canClose() {
4369
+ return onCanClose ? onCanClose() : true;
4370
+ }
4371
+
4367
4372
  var actions = /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Button, {
4368
4373
  label: "CERRAR",
4369
4374
  action: function action() {
4370
4375
  return onAction("CLOSE");
4371
- }
4376
+ },
4377
+ disabled: canClose()
4372
4378
  }));
4373
4379
  var title = /*#__PURE__*/React.createElement(Text, {
4374
4380
  use: "headline6"