0.5.1 • Published 7 years ago
react-layout-plugin-dnd v0.5.1
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]}
/>
...