How to use the react-dnd/lib/DragDropContextProvider.default function in react-dnd

To help you get started, we’ve selected a few react-dnd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / redux-dag-history / packages / dag-history-component / stories / components / History / index.tsx View on Github external
import { storiesOf } from '@storybook/react'
import { fromJS } from 'immutable'
import { get } from 'lodash'
import * as React from 'react'
import HTML5Backend from 'react-dnd-html5-backend'
import { Provider } from 'react-redux'
import * as redux from 'redux'
import { HistoryType, ComponentView } from '../../../src/interfaces'
import { createLogger } from 'redux-logger'
import thunk from 'redux-thunk'
import createHistoryContainer from '../../../src/components/createHistoryContainer'
const { action } = require('@storybook/addon-actions')

const DragDropContextProvider = require('react-dnd/lib/DragDropContextProvider')
	.default

const Container = createHistoryContainer(
	(state: any) => state.app,
	(state: any) => state.component,
	(state: any) => get(state, 'metadata.source'),
)

function createStore(state: any) {
	// A simple static reducer
	const reducer = () => state

	// If the redux devtools are available, wire into them
	const composeEnhancers =
		(window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || redux.compose
	const logger = createLogger()