@dhis2-ui/portal 10.16.3-alpha.1 → 10.16.4

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.
@@ -20,12 +20,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
20
20
  * This needs to be a function so that it works in tests as well.
21
21
  */
22
22
  const getDefaultNode = () => document.getElementById('dhis2-portal-root') || document.body;
23
- const Portal = _ref => {
24
- let {
25
- children,
26
- node,
27
- disable
28
- } = _ref;
23
+ const Portal = ({
24
+ children,
25
+ node,
26
+ disable
27
+ }) => {
29
28
  const [mountNode, setMountNode] = (0, _react.useState)(null);
30
29
  (0, _react.useEffect)(() => {
31
30
  setMountNode(node || getDefaultNode());
@@ -14,12 +14,11 @@ import { createPortal } from 'react-dom';
14
14
  * This needs to be a function so that it works in tests as well.
15
15
  */
16
16
  const getDefaultNode = () => document.getElementById('dhis2-portal-root') || document.body;
17
- export const Portal = _ref => {
18
- let {
19
- children,
20
- node,
21
- disable
22
- } = _ref;
17
+ export const Portal = ({
18
+ children,
19
+ node,
20
+ disable
21
+ }) => {
23
22
  const [mountNode, setMountNode] = useState(null);
24
23
  useEffect(() => {
25
24
  setMountNode(node || getDefaultNode());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/portal",
3
- "version": "10.16.3-alpha.1",
3
+ "version": "10.16.4",
4
4
  "description": "UI Portal",
5
5
  "repository": {
6
6
  "type": "git",