Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 592 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 592 Bytes

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]}
/>

...