()
| 39 | }; |
| 40 | |
| 41 | render() { |
| 42 | const { canDrop, isOver, allowedDropEffect, connectDropTarget } = this.props; |
| 43 | const isActive = canDrop && isOver; |
| 44 | |
| 45 | let backgroundColor = '#222'; |
| 46 | if (isActive) { |
| 47 | backgroundColor = 'darkgreen'; |
| 48 | } else if (canDrop) { |
| 49 | backgroundColor = 'darkkhaki'; |
| 50 | } |
| 51 | |
| 52 | return connectDropTarget( |
| 53 | <div style={{ ...style, backgroundColor }}> |
| 54 | { `Works with ${allowedDropEffect} drop effect` }<br /><br /> |
| 55 | {isActive ? |
| 56 | 'Release to drop' : |
| 57 | 'Drag a box here' |
| 58 | } |
| 59 | </div>, |
| 60 | ); |
| 61 | } |
| 62 | } |
nothing calls this directly
no outgoing calls
no test coverage detected