/**
 * 只遮罩内容块区的Modal
 */
import React, { useEffect } from 'react'
import "./style.less"
import classNames from 'classnames'
import { Modal } from "antd"

export default React.memo(Page)
function Page(props) {
  let { className, wrapClassName, ...rest } = props
  wrapClassName = classNames({
    "xsk-content-modal": true,
    [wrapClassName]: !!wrapClassName
  })
  
  return (
    <Modal
      {...props}
      maskStyle={{position: "absolute"}}
      wrapClassName={wrapClassName}
      getContainer={() => document.querySelector(".content")}
    >
      {props.children}
    </Modal>
  )
}