Skip to content

Commit

Permalink
ci: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
mumiao committed Dec 24, 2020
2 parents 802eb3b + 4c6bda2 commit 1e3ad37
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/modal/demo/modal-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ Custom modal content render. use `react-draggable` implements draggable.
import { Modal, Button } from 'antd';
import Draggable from 'react-draggable';

// import { getTargetRect } from './utils';

class App extends React.Component {
state = {
visible: false,
disabled: true,
bounds: { left: 0, top: 0, bottom: 0, right: 0 },
};

draggleRef = React.createRef();

showModal = () => {
Expand Down Expand Up @@ -64,8 +63,9 @@ class App extends React.Component {
},
});
};

render() {
const { bounds } = this.state;
const { bounds, disabled, visible } = this.state;
return (
<>
<Button onClick={this.showModal}>Open Draggable Modal</Button>
Expand All @@ -77,7 +77,7 @@ class App extends React.Component {
cursor: 'move',
}}
onMouseOver={() => {
if (this.state.disabled) {
if (disabled) {
this.setState({
disabled: false,
});
Expand All @@ -97,11 +97,11 @@ class App extends React.Component {
Draggable Modal
</div>
}
visible={this.state.visible}
visible={visible}
onOk={this.handleOk}
onCancel={this.handleCancel}
modalRender={modal => (
<Draggable disabled={this.state.disabled} onDrag={this.onDrag} bounds={bounds}>
<Draggable disabled={disabled} bounds={bounds}>
<div ref={this.draggleRef}>{modal}</div>
</Draggable>
)}
Expand Down

0 comments on commit 1e3ad37

Please sign in to comment.