1.2.0 • Published 4 months ago

dnd-sortable v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Sortable

dnd-sortable

This is sortable drag and drop

Installation

Install my-project with npm

  npm install dnd-sortable
  cd my-project

Acknowledgements

Usage/Examples

import SortableList from 'dnd-sortable'

``` const [items, setItems] = useState( [
      {
            id: 1,
            text: 'Write a cool JS library',
            title:"this is Library titile"
          },
          {
            id: 2,
            text: 'Make it generic enough',
            title:"this is Library titile"
          },
          {
            id: 3,
            text: 'Write README',
            title:"this is Library titile"
          },
          {
            id: 4,
            text: 'Create some examples',
            title:"this is Library titile"
          }, {
                  id: 5,
                  text: 'Spam in Twitter and IRC to promote it (note that this element is taller than the others)',
                  title:"this is Library titile"
                },
                {
                  id: 6,
                  text: '???',
                  title:"this is Library titile"
                },
                {
                  id: 7,
                  text: 'PROFIT',
                  title:"this is Library titile"
                }
              ]);

              const handleMove = (node)=>{
                  // you can get updated  data after drag drop
              }


<SortableList data= {data} handleMove={handleMove}/>

## Authors

- [@abdulhanna](https://github.com/abdulhanna)


## 🚀 About Me
I'm a full stack developer...