@panneau/element-modal 2.0.65 → 2.0.67

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 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.65",
3
+ "version": "2.0.67",
4
4
  "description": "Modal element",
5
5
  "keywords": [
6
6
  "javascript"
@@ -56,5 +56,5 @@
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "296e9ef82abdc2af9ffd2910a65e2630a630bfd4"
59
+ "gitHead": "ac972a8e66c405de1c4d4606d347f3a3f1e839e8"
60
60
  }