ywana-core8 0.0.788 → 0.0.790
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.cjs
CHANGED
@@ -4353,6 +4353,7 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
4353
4353
|
children = _ref.children,
|
4354
4354
|
className = _ref.className,
|
4355
4355
|
disabled = _ref.disabled,
|
4356
|
+
onCanClose = _ref.onCanClose,
|
4356
4357
|
_ref$overlayCanClose = _ref.overlayCanClose,
|
4357
4358
|
overlayCanClose = _ref$overlayCanClose === void 0 ? true : _ref$overlayCanClose;
|
4358
4359
|
var site = React.useContext(SiteContext);
|
@@ -4372,11 +4373,16 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
4372
4373
|
}
|
4373
4374
|
}
|
4374
4375
|
|
4376
|
+
function canClose() {
|
4377
|
+
return onCanClose ? onCanClose() : true;
|
4378
|
+
}
|
4379
|
+
|
4375
4380
|
var actions = /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement(Button, {
|
4376
4381
|
label: "CERRAR",
|
4377
4382
|
action: function action() {
|
4378
4383
|
return onAction("CLOSE");
|
4379
|
-
}
|
4384
|
+
},
|
4385
|
+
disabled: !canClose()
|
4380
4386
|
}));
|
4381
4387
|
var title = /*#__PURE__*/React__default["default"].createElement(Text, {
|
4382
4388
|
use: "headline6"
|