diff --git a/packages/react-ui-components/package.json b/packages/react-ui-components/package.json
index 28682ec9a4..f5f1b3be48 100644
--- a/packages/react-ui-components/package.json
+++ b/packages/react-ui-components/package.json
@@ -53,7 +53,6 @@
"react-dom": "^16.0.0",
"react-height": "^3.0.0",
"react-motion": "^0.5.0",
- "react-portal": "^4.2.0",
"react-svg": "^11.1.2",
"react-textarea-autosize": "^8.3.0"
},
diff --git a/packages/react-ui-components/src/Dialog/__snapshots__/dialog.spec.tsx.snap b/packages/react-ui-components/src/Dialog/__snapshots__/dialog.spec.tsx.snap
index ca688dd8c8..f61dc84713 100644
--- a/packages/react-ui-components/src/Dialog/__snapshots__/dialog.spec.tsx.snap
+++ b/packages/react-ui-components/src/Dialog/__snapshots__/dialog.spec.tsx.snap
@@ -37,7 +37,9 @@ exports[` Content should render correctly. 1`] = `
`;
exports[` Portal should render correctly. 1`] = `
-
+}
+>
', () => {
it('should render the "dialog--wide" className from the "theme" prop if the style is wide.', () => {
const wrapper = shallow();
- const portal = wrapper.find(Portal);
- const section = portal.find('section');
+ const section = wrapper.find('section');
expect(section.prop('className')).toContain('wideClassName');
});
it('should render the "dialog--jumbo" className from the "theme" prop if the style is jumbo.', () => {
const wrapper = shallow();
- const portal = wrapper.find(Portal);
- const section = portal.find('section');
+ const section = wrapper.find('section');
expect(section.prop('className')).toContain('jumboClassName');
});
it('should render the "dialog--narrow" className from the "theme" prop if the style is narrow.', () => {
const wrapper = shallow();
- const portal = wrapper.find(Portal);
- const section = portal.find('section');
+ const section = wrapper.find('section');
expect(section.prop('className')).toContain('narrowClassName');
});
diff --git a/packages/react-ui-components/src/Dialog/dialog.tsx b/packages/react-ui-components/src/Dialog/dialog.tsx
index 9573717eb8..abf274233d 100644
--- a/packages/react-ui-components/src/Dialog/dialog.tsx
+++ b/packages/react-ui-components/src/Dialog/dialog.tsx
@@ -1,6 +1,6 @@
import mergeClassNames from 'classnames';
import React, { PureComponent, ReactNode } from 'react';
-import { Portal } from 'react-portal';
+import { createPortal } from 'react-dom';
import { Dialog, DialogManager } from './DialogManager';
type DialogType = 'success' | 'warn' | 'error';
@@ -180,18 +180,17 @@ class DialogWithOverlay extends PureComponent {
return null;
}
- return (
-
-
-
+ return createPortal(
+ ,
+ document.body
);
}