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