diff --git a/src/components/nowPlaying/NpCardWrap.tsx b/src/components/nowPlaying/NpCardWrap.tsx new file mode 100644 index 00000000..451f952d --- /dev/null +++ b/src/components/nowPlaying/NpCardWrap.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import { useDragSource } from '../../contexts/DragDropContext'; +import type { NpCardId } from '../../store/nowPlayingLayoutStore'; + +interface NpCardWrapProps { + id: NpCardId; + label: string; + isDraggingThis: boolean; + children: React.ReactNode; +} + +export default function NpCardWrap({ id, label, isDraggingThis, children }: NpCardWrapProps) { + const dragProps = useDragSource(() => ({ + data: JSON.stringify({ kind: 'np-card', id }), + label, + })); + return ( +