@wonderflow/react-components 3.0.0-next.7 → 3.0.0-next.8
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { ModalProvider } from '../modal';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
-
export const OverlayContainer = ({ children, root = document.body }) => {
|
|
4
|
+
export const OverlayContainer = ({ children, root = document.body, index = 4 }) => {
|
|
5
5
|
useEffect(() => {
|
|
6
6
|
if (root.closest('[data-overlay-container]')) {
|
|
7
7
|
throw new Error('An OverlayContainer must not be inside another container. Please change the root prop.');
|
|
8
8
|
}
|
|
9
9
|
}, [root]);
|
|
10
10
|
const content = (React.createElement(ModalProvider, null,
|
|
11
|
-
React.createElement("div", { "data-overlay-container": true }, children)));
|
|
11
|
+
React.createElement("div", { "data-overlay-container": true, style: { position: 'relative', zIndex: index } }, children)));
|
|
12
12
|
return createPortal(content, root);
|
|
13
13
|
};
|
package/package.json
CHANGED
package/themes/dark.css
CHANGED
package/themes/light.css
CHANGED
package/themes.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
color: var(--global-foreground);
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on Thu, 16 Dec 2021
|
|
7
|
+
* Generated on Thu, 16 Dec 2021 10:25:09 GMT
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
color: var(--global-foreground);
|
|
52
52
|
/**
|
|
53
53
|
* Do not edit directly
|
|
54
|
-
* Generated on Thu, 16 Dec 2021
|
|
54
|
+
* Generated on Thu, 16 Dec 2021 10:25:09 GMT
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
color: var(--global-foreground);
|
|
100
100
|
/**
|
|
101
101
|
* Do not edit directly
|
|
102
|
-
* Generated on Thu, 16 Dec 2021
|
|
102
|
+
* Generated on Thu, 16 Dec 2021 10:25:09 GMT
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
|