@kellcantcount/simple-dnd

0.1.0 • Public • Published

Simple DND using react

Creating a drop component:

<DragAndDrop drop id="foo" handleDrop={(elId) => yourFunc(elId)} children={<ChildComponentHere/>}>

The handle drop prop is so that you can set state etc or do what you like on drop - the handleDrop used in the component just gets the dragged element id for you and passes it to be used in the function you supply.

Creating a drag component:

<DragAndDrop drag id="bar"children={<ChildComponentHere/>}>

Readme

Keywords

none

Package Sidebar

Install

npm i @kellcantcount/simple-dnd

Weekly Downloads

1

Version

0.1.0

License

none

Unpacked Size

24.9 kB

Total Files

14

Last publish

Collaborators

  • kellcantcount