ywana-core8 0.0.785 → 0.0.786
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 +8 -2
package/dist/index.modern.js
CHANGED
@@ -4218,7 +4218,15 @@ var Dialog = function Dialog(props) {
|
|
4218
4218
|
children = props.children,
|
4219
4219
|
actions = props.actions,
|
4220
4220
|
className = props.className,
|
4221
|
-
onClose = props.onClose
|
4221
|
+
onClose = props.onClose,
|
4222
|
+
_props$overlayCanClos = props.overlayCanClose,
|
4223
|
+
overlayCanClose = _props$overlayCanClos === void 0 ? true : _props$overlayCanClos;
|
4224
|
+
|
4225
|
+
function overlayClose() {
|
4226
|
+
if (overlayCanClose) {
|
4227
|
+
close();
|
4228
|
+
}
|
4229
|
+
}
|
4222
4230
|
|
4223
4231
|
function close() {
|
4224
4232
|
if (onClose) onClose();
|
@@ -4232,7 +4240,7 @@ var Dialog = function Dialog(props) {
|
|
4232
4240
|
|
4233
4241
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
4234
4242
|
className: "overlay " + className,
|
4235
|
-
onMouseDown:
|
4243
|
+
onMouseDown: overlayClose
|
4236
4244
|
}), /*#__PURE__*/React.createElement("dialog", {
|
4237
4245
|
className: "dialog-panel " + className
|
4238
4246
|
}, /*#__PURE__*/React.createElement("header", null, icon ? /*#__PURE__*/React.createElement(MenuIcon, {
|