fix(deps): update react-dnd monorepo (major) (#5405)
This commit is contained in:
@ -42,8 +42,8 @@
|
||||
"node-polyglot": "^2.3.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.8.4",
|
||||
"react-dnd": "^7.3.2",
|
||||
"react-dnd-html5-backend": "^7.2.0",
|
||||
"react-dnd": "^14.0.0",
|
||||
"react-dnd-html5-backend": "^14.0.0",
|
||||
"react-dom": "^16.8.4",
|
||||
"react-frame-component": "^5.0.0",
|
||||
"react-hot-loader": "^4.8.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import ReactDNDHTML5Backend from 'react-dnd-html5-backend';
|
||||
import { HTML5Backend as ReactDNDHTML5Backend } from 'react-dnd-html5-backend';
|
||||
import {
|
||||
DragDropContext as ReactDNDDragDropContext,
|
||||
DndProvider as ReactDNDProvider,
|
||||
DragSource as ReactDNDDragSource,
|
||||
DropTarget as ReactDNDDropTarget,
|
||||
} from 'react-dnd';
|
||||
@ -53,6 +53,14 @@ DropTarget.propTypes = {
|
||||
children: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export function HTML5DragDrop(component) {
|
||||
return ReactDNDDragDropContext(ReactDNDHTML5Backend)(component);
|
||||
export function HTML5DragDrop(WrappedComponent) {
|
||||
return class HTML5DragDrop extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<ReactDNDProvider backend={ReactDNDHTML5Backend}>
|
||||
<WrappedComponent {...this.props} />
|
||||
</ReactDNDProvider>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user