@atlaskit/portal
Version:
A wrapper for rendering components in React portals.
14 lines • 415 B
JavaScript
import { portalClassName } from '../constants';
const isDocumentDefined = () => {
return document !== undefined;
};
export const createAtlaskitPortal = zIndex => {
//atlaskit-portal div
if (isDocumentDefined()) {
const atlaskitportal = document.createElement('div');
atlaskitportal.className = portalClassName;
atlaskitportal.style.zIndex = `${zIndex}`;
return atlaskitportal;
}
return;
};