import React, { Component } from "react";
import style from "./index.less";
import close from '../../../common/images/icon_close.png'
import { dragBox } from '@utils/drag';
import ReactDom from "react-dom";

class DiscontentSon extends Component {
  constructor(props) {
    super(props);
  }
  componentDidMount(){
    dragBox('disContentWrap','DisclatmerTitle','add')
  }

  render() {
    const { closeDisclatmerModal,disVisible,disclatmerContent } = this.props;
    const domNode = document.getElementById('root');
    return ReactDom.createPortal(<React.Fragment>
          <div className={style["shade"]} onClick={closeDisclatmerModal}/>
          <div className={style["disContent"]} id="disContentWrap">
            <div className={`${style["header"]} drag-title`} id="DisclatmerTitle">免责声明</div>
            <img src={close} onClick={closeDisclatmerModal} />
            <div className={style["content"]}>{disclatmerContent}</div>
            <div className={style["btnBox"]}><span  className={style["btn"]} onClick={closeDisclatmerModal}>确定</span></div>
          </div>
          </React.Fragment>,domNode)
  }
}

export default DiscontentSon;
