mirror of
https://github.com/penpot/penpot.git
synced 2025-05-31 19:56:10 +02:00
➕ Add React-DnD dependency bundle.
This commit is contained in:
parent
fcc7351552
commit
dbf754880e
10 changed files with 4309 additions and 3 deletions
18
frontend/vendor/react-dnd/react-dnd.js
vendored
Normal file
18
frontend/vendor/react-dnd/react-dnd.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue