ywana-core8 0.0.785 → 0.0.787
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 +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +10 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +10 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/site/dialog.js +9 -3
package/dist/index.cjs
CHANGED
@@ -4226,7 +4226,15 @@ var Dialog = function Dialog(props) {
|
|
4226
4226
|
children = props.children,
|
4227
4227
|
actions = props.actions,
|
4228
4228
|
className = props.className,
|
4229
|
-
onClose = props.onClose
|
4229
|
+
onClose = props.onClose,
|
4230
|
+
_props$overlayCanClos = props.overlayCanClose,
|
4231
|
+
overlayCanClose = _props$overlayCanClos === void 0 ? true : _props$overlayCanClos;
|
4232
|
+
|
4233
|
+
function overlayClose() {
|
4234
|
+
if (overlayCanClose) {
|
4235
|
+
close();
|
4236
|
+
}
|
4237
|
+
}
|
4230
4238
|
|
4231
4239
|
function close() {
|
4232
4240
|
if (onClose) onClose();
|
@@ -4240,7 +4248,7 @@ var Dialog = function Dialog(props) {
|
|
4240
4248
|
|
4241
4249
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
4242
4250
|
className: "overlay " + className,
|
4243
|
-
onMouseDown:
|
4251
|
+
onMouseDown: overlayClose
|
4244
4252
|
}), /*#__PURE__*/React__default["default"].createElement("dialog", {
|
4245
4253
|
className: "dialog-panel " + className
|
4246
4254
|
}, /*#__PURE__*/React__default["default"].createElement("header", null, icon ? /*#__PURE__*/React__default["default"].createElement(MenuIcon, {
|