import { createPortal } from 'react-dom';
import { MODAL_ROOT } from './constants';

var PortalToRoot = function PortalToRoot(_ref) {
  var children = _ref.children;
  return typeof window === 'undefined' ? null : /*#__PURE__*/createPortal(children, document.getElementById(MODAL_ROOT));
};

export default PortalToRoot;