@longline/aqua-ui 1.0.101 → 1.0.102
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/package.json
CHANGED
|
@@ -22,6 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
24
|
import { CSSTransition } from 'react-transition-group';
|
|
25
|
+
import { createPortal } from 'react-dom';
|
|
25
26
|
// Other controls
|
|
26
27
|
import { DialogBackground } from './DialogBackground';
|
|
27
28
|
import { DialogWindow } from './DialogWindow';
|
|
@@ -65,10 +66,10 @@ var DialogBase = function (props) {
|
|
|
65
66
|
// and
|
|
66
67
|
// https://veerasundar.com/blog/2018/12/how-to-animate-page-transition-in-react-using-styled-components/
|
|
67
68
|
return (React.createElement(React.Fragment, null,
|
|
68
|
-
React.createElement(CSSTransition, { in: props.open, timeout: 300, unmountOnExit: true, classNames: "fade" },
|
|
69
|
-
React.createElement(DialogBackground, null)),
|
|
70
|
-
React.createElement(CSSTransition, { in: props.open, timeout: 300, unmountOnExit: true, classNames: "fade" },
|
|
71
|
-
React.createElement(DialogWindow, { inverted: props.inverted, width: props.width, ref: windowRef }, props.children))));
|
|
69
|
+
createPortal(React.createElement(CSSTransition, { in: props.open, timeout: 300, unmountOnExit: true, classNames: "fade" },
|
|
70
|
+
React.createElement(DialogBackground, null)), document.body),
|
|
71
|
+
createPortal(React.createElement(CSSTransition, { in: props.open, timeout: 300, unmountOnExit: true, classNames: "fade" },
|
|
72
|
+
React.createElement(DialogWindow, { inverted: props.inverted, width: props.width, ref: windowRef }, props.children)), document.body)));
|
|
72
73
|
};
|
|
73
74
|
var Dialog = function (_a) {
|
|
74
75
|
var _b = _a.open, open = _b === void 0 ? false : _b, _c = _a.canClose, canClose = _c === void 0 ? true : _c, _d = _a.width, width = _d === void 0 ? 600 : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, props = __rest(_a, ["open", "canClose", "width", "inverted"]);
|