From bfec3327fb382974876dc504667b366ee0188928 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 2 Oct 2020 20:42:10 +0100 Subject: [PATCH] Remove deprecated portal implementation --- .../builder/src/components/common/Modal/portal.js | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 packages/builder/src/components/common/Modal/portal.js diff --git a/packages/builder/src/components/common/Modal/portal.js b/packages/builder/src/components/common/Modal/portal.js deleted file mode 100644 index a5070cad7d..0000000000 --- a/packages/builder/src/components/common/Modal/portal.js +++ /dev/null @@ -1,14 +0,0 @@ -export function portal(node, targetNodeOrSelector) { - const targetNode = - typeof targetNodeOrSelector == "string" - ? document.querySelector(targetNodeOrSelector) - : targetNodeOrSelector - const portalChildren = [...node.children] - targetNode.append(...portalChildren) - - return { - destroy() { - for (const portalChild of portalChildren) portalChild.remove() - }, - } -}