0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-15 19:48:22 -05:00
penpot/frontend/vendor/react-dnd/react-dnd.js

19 lines
504 B
JavaScript
Raw Normal View History

import { useDrag, useDrop } from "react-dnd/dist/esm/hooks";
import { DndProvider } from "react-dnd/dist/esm/common";
import HTML5Backend from "react-dnd-html5-backend";
if (typeof self !== "undefined") { init(self); }
else if (typeof global !== "undefined") { init(global); }
else if (typeof window !== "undefined") { init(window); }
else { throw new Error("unsupported execution environment"); }
function init(g) {
g.ReactDnd = {
useDrag,
useDrop,
DndProvider,
HTML5Backend
};
}