react-dnd-mouse-backend
Version:
A lightweight attempt for solving the whole HTML5 DnD - svg tags compability issue
29 lines (24 loc) • 578 B
JavaScript
import React from 'react'
import Source from './Source'
const Sources = React.createClass({
render() {
const { hideSourceOnDrag, boxes } = this.props
return (
<div>
{Object.keys(boxes).map(key => {
const { left, top, title } = boxes[key]
return (
<Source key={key}
id={key}
left={left}
top={top}
hideSourceOnDrag={hideSourceOnDrag}>
{title}
</Source>
)
})}
</div>
)
}
})
export default Sources