@ray-js/components 1.3.0-beta.2-beta-2 → 1.3.0
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/lib/Modal/index.d.ts +2 -0
- package/lib/Modal/index.js +6 -0
- package/lib/Modal/index.web.d.ts +2 -0
- package/lib/Modal/index.web.js +13 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/package.json +7 -7
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import ReactDOM from 'react-dom';
|
3
|
+
export default function Modal(_ref) {
|
4
|
+
var children = _ref.children;
|
5
|
+
var domNode = React.useRef(document.createElement('div'));
|
6
|
+
React.useEffect(function () {
|
7
|
+
document.body.appendChild(domNode.current);
|
8
|
+
return function () {
|
9
|
+
document.body.removeChild(domNode.current);
|
10
|
+
};
|
11
|
+
}, []);
|
12
|
+
return /*#__PURE__*/ReactDOM.createPortal(children, domNode.current);
|
13
|
+
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -30,4 +30,5 @@ export { default as WebView } from './WebView';
|
|
30
30
|
export { default as Map } from './Map';
|
31
31
|
export { default as Camera } from './Camera';
|
32
32
|
export { default as Progress } from './Progress';
|
33
|
-
export { default as Iframe } from './Iframe';
|
33
|
+
export { default as Iframe } from './Iframe';
|
34
|
+
export { default as Modal } from './Modal';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/components",
|
3
|
-
"version": "1.3.0
|
3
|
+
"version": "1.3.0",
|
4
4
|
"description": "Ray basic components",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -24,10 +24,10 @@
|
|
24
24
|
"watch": "ray start --type=component"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@ray-core/macro": "^0.
|
28
|
-
"@ray-core/wechat": "^0.
|
29
|
-
"@ray-js/adapter": "^1.3.0
|
30
|
-
"@ray-js/framework-shared": "^1.3.0
|
27
|
+
"@ray-core/macro": "^0.3.0",
|
28
|
+
"@ray-core/wechat": "^0.3.0",
|
29
|
+
"@ray-js/adapter": "^1.3.0",
|
30
|
+
"@ray-js/framework-shared": "^1.3.0",
|
31
31
|
"ahooks": "^3.7.1",
|
32
32
|
"clsx": "^1.1.1",
|
33
33
|
"core-js": "^3.19.1",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"style-to-object": "^0.3.0"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
-
"@ray-js/cli": "^1.3.0
|
40
|
+
"@ray-js/cli": "^1.3.0"
|
41
41
|
},
|
42
42
|
"maintainers": [
|
43
43
|
{
|
@@ -45,6 +45,6 @@
|
|
45
45
|
"email": "tuyafe@tuya.com"
|
46
46
|
}
|
47
47
|
],
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "f7f96c375a429a2fa94452b0a9af3f841572921a",
|
49
49
|
"repository": {}
|
50
50
|
}
|