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.
import React from 'react';
import { Layout } from 'react-layout-core';
import DnD from 'react-layout-plugin-dnd';
...
<Layout
layoutState={layoutState}
components={{...}}
plugins={[DnD]}
/>
...