UNPKG

@atlaskit/portal

Version:

A wrapper for rendering components in React portals.

14 lines 466 B
import { portalClassName } from '../constants'; var isDocumentDefined = function isDocumentDefined() { return document !== undefined; }; export var createAtlaskitPortal = function createAtlaskitPortal(zIndex) { //atlaskit-portal div if (isDocumentDefined()) { var atlaskitportal = document.createElement('div'); atlaskitportal.className = portalClassName; atlaskitportal.style.zIndex = "".concat(zIndex); return atlaskitportal; } return; };