UNPKG

@atlaskit/portal

Version:

A wrapper for rendering components in React portals.

20 lines (19 loc) 614 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createAtlaskitPortal = void 0; var _constants = require("../constants"); var isDocumentDefined = function isDocumentDefined() { return document !== undefined; }; var createAtlaskitPortal = exports.createAtlaskitPortal = function createAtlaskitPortal(zIndex) { //atlaskit-portal div if (isDocumentDefined()) { var atlaskitportal = document.createElement('div'); atlaskitportal.className = _constants.portalClassName; atlaskitportal.style.zIndex = "".concat(zIndex); return atlaskitportal; } return; };