2025-04-18 14:28:06 +02:00
|
|
|
/*
|
|
|
|
|
* 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';
|
2026-03-11 00:11:29 +01:00
|
|
|
import type { ReactNode } from 'react';
|
2025-04-18 14:28:06 +02:00
|
|
|
|
|
|
|
|
export const DndOverlayItem = ({ isActive, children }: { isActive: boolean; children?: ReactNode }) => {
|
|
|
|
|
if (!isActive) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return <DragOverlay style={{ cursor: 'grabbing' }}>{children}</DragOverlay>;
|
|
|
|
|
};
|