import React from 'react'
import styles from './index.module.scss'
import { Button, Modal } from 'antd'

type Props = {
  closeFu: () => void
  text: string
}

function X2lookText({ closeFu, text }: Props) {
  return (
    <Modal
      wrapClassName={styles.X2lookText}
      destroyOnClose
      open={true}
      title='详情'
      footer={
        [] // 设置footer为空，去掉 取消 确定默认按钮
      }
    >
      <div className='YtMain' dangerouslySetInnerHTML={{ __html: text }}></div>

      <div className='YtBtn'>
        <Button onClick={closeFu}>关闭</Button>
      </div>
    </Modal>
  )
}

const MemoX2lookText = React.memo(X2lookText)

export default MemoX2lookText
