@panneau/element-modal 2.0.65 → 2.0.69
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/es/index.js +9 -0
- package/lib/index.js +9 -0
- package/package.json +6 -6
package/es/index.js
CHANGED
|
@@ -110,6 +110,15 @@ var Modals = function Modals(_ref) {
|
|
|
110
110
|
setContainer(containerRef.current);
|
|
111
111
|
}
|
|
112
112
|
}, [setContainer]);
|
|
113
|
+
useEffect(function () {
|
|
114
|
+
if (document.body) {
|
|
115
|
+
if (modals !== null && modals.length > 0) {
|
|
116
|
+
document.body.className = 'modal-open';
|
|
117
|
+
} else {
|
|
118
|
+
document.body.className = '';
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}, [modals]);
|
|
113
122
|
return /*#__PURE__*/React.createElement("div", {
|
|
114
123
|
className: classNames([styles.modalsContainer, _defineProperty({}, className, className)])
|
|
115
124
|
}, /*#__PURE__*/React.createElement("div", {
|
package/lib/index.js
CHANGED
|
@@ -122,6 +122,15 @@ var Modals = function Modals(_ref) {
|
|
|
122
122
|
setContainer(containerRef.current);
|
|
123
123
|
}
|
|
124
124
|
}, [setContainer]);
|
|
125
|
+
React.useEffect(function () {
|
|
126
|
+
if (document.body) {
|
|
127
|
+
if (modals !== null && modals.length > 0) {
|
|
128
|
+
document.body.className = 'modal-open';
|
|
129
|
+
} else {
|
|
130
|
+
document.body.className = '';
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}, [modals]);
|
|
125
134
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
126
135
|
className: classNames__default["default"]([styles.modalsContainer, _defineProperty__default["default"]({}, className, className)])
|
|
127
136
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/element-modal",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.69",
|
|
4
4
|
"description": "Modal element",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@babel/runtime": "^7.12.5",
|
|
48
|
-
"@panneau/core": "^2.0.
|
|
49
|
-
"@panneau/element-button": "^2.0.
|
|
50
|
-
"@panneau/element-icon": "^2.0.
|
|
51
|
-
"@panneau/element-label": "^2.0.
|
|
48
|
+
"@panneau/core": "^2.0.69",
|
|
49
|
+
"@panneau/element-button": "^2.0.69",
|
|
50
|
+
"@panneau/element-icon": "^2.0.69",
|
|
51
|
+
"@panneau/element-label": "^2.0.69",
|
|
52
52
|
"classnames": "^2.2.6",
|
|
53
53
|
"prop-types": "^15.7.2",
|
|
54
54
|
"react-intl": "^5.15.8||^6.0.0"
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "270c1e84966861e94a390d20ee525c33f7edadb0"
|
|
60
60
|
}
|