We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06fb348 commit e94acc1Copy full SHA for e94acc1
src/components/tabs/dragAndDrop.tsx
@@ -0,0 +1,17 @@
1
+import * as React from 'react';
2
+import { DndProvider, createDndContext } from 'react-dnd';
3
+import HTML5Backend from 'react-dnd-html5-backend';
4
+import { PropsWithChildren, useRef } from 'react';
5
+
6
+const RNDContext = createDndContext(HTML5Backend);
7
8
+function DragAndDrop({ children }: PropsWithChildren<{}>): JSX.Element {
9
+ const manager = useRef(RNDContext);
10
+ return (
11
+ <DndProvider manager={manager.current.dragDropManager}>
12
+ {children}
13
+ </DndProvider>
14
+ );
15
+}
16
17
+export default DragAndDrop;
0 commit comments