Replace "react-beautiful-dnd" with "dnd-kit"
"react-beautiful-dnd" has been deprecated for quite some time
This commit is contained in:
18
src/lib/dnd-kit/DndOverlayItem.tsx
Normal file
18
src/lib/dnd-kit/DndOverlayItem.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { DragOverlay } from '@dnd-kit/core';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export const DndOverlayItem = ({ isActive, children }: { isActive: boolean; children?: ReactNode }) => {
|
||||
if (!isActive) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <DragOverlay style={{ cursor: 'grabbing' }}>{children}</DragOverlay>;
|
||||
};
|
||||
Reference in New Issue
Block a user