import { createPortal } from 'preact/compat'

const Portal = ({ children, container = typeof document !== 'undefined' && document.body }) =>
  createPortal(children, container)

export default Portal
