@mezzanine-ui/react 0.14.0 → 0.14.1
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/Portal/Portal.js +4 -1
- package/package.json +4 -4
package/Portal/Portal.js
CHANGED
|
@@ -7,12 +7,15 @@ const Portal = (props) => {
|
|
|
7
7
|
const { children, container, disablePortal = false, } = props;
|
|
8
8
|
const [portalElement, setPortalElement] = useState(() => (disablePortal
|
|
9
9
|
? null
|
|
10
|
-
: getElement(container)
|
|
10
|
+
: getElement(container)));
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
if (!disablePortal) {
|
|
13
13
|
setPortalElement(getElement(container) || document.body);
|
|
14
14
|
}
|
|
15
15
|
}, [container, disablePortal]);
|
|
16
|
+
/** This element is fully client side, so `return null` on server side */
|
|
17
|
+
if (typeof window === 'undefined')
|
|
18
|
+
return null;
|
|
16
19
|
if (disablePortal || !portalElement) {
|
|
17
20
|
return jsx(Fragment, { children: children });
|
|
18
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mezzanine-ui/react",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "React components for mezzanine-ui",
|
|
5
5
|
"author": "Mezzanine",
|
|
6
6
|
"repository": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"react-dom": "^18.2.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@mezzanine-ui/core": "^0.14.
|
|
32
|
-
"@mezzanine-ui/icons": "^0.14.
|
|
33
|
-
"@mezzanine-ui/system": "^0.14.
|
|
31
|
+
"@mezzanine-ui/core": "^0.14.1",
|
|
32
|
+
"@mezzanine-ui/icons": "^0.14.1",
|
|
33
|
+
"@mezzanine-ui/system": "^0.14.1",
|
|
34
34
|
"@popperjs/core": "^2.11.6",
|
|
35
35
|
"@types/react-transition-group": "^4.4.8",
|
|
36
36
|
"clsx": "^2.0.0",
|