react-layout-plugin-dnd
v0.5.1
Published
A react-layout-core plugin, that turns evey layoutState item into a react-dnd DragSource
Downloads
6
Maintainers
Readme
React Layout Plugin DnD
A plugin for the react-layout-core package.
This plugin enables any component to be used as a react-dnd DragSource
, and wraps the layout with a DragDropContext
. It supplies monitor.getItem()
with the layoutState
item being dragged.
Usage
import React from 'react';
import { Layout } from 'react-layout-core';
import DnD from 'react-layout-plugin-dnd';
...
<Layout
layoutState={layoutState}
components={{...}}
plugins={[DnD]}
/>
...