/*
 * @Description:
 * @Author: leizhe
 * @Date: 2021-10-09 15:08:18
 * @LastEditTime: 2021-10-11 10:21:35
 * @LastEditors: leizhe
 */
import React, { PureComponent } from 'react';
import DragM from 'dragm';

export default class ModalDrag extends PureComponent {
  updateTransform = transformStr => {
    this.modalDom.style.transform = transformStr;
  };

  componentDidMount() {
    this.modalDom = document.getElementsByClassName('ant-modal-wrap')[0];
  }

  render() {
    const { title } = this.props;
    return (
      <DragM updateTransform={this.updateTransform}>
        <div>{title}</div>
      </DragM>
    );
  }
}
