Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,23 @@ import {
dropTargetForElements,
ElementDropTargetEventBasePayload
} from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
import { cn } from "@/lib/utils";

type SidebarTabDropTargetProps = {
spaceData: Space;
isSpaceLight: boolean;
moveTab: (tabId: number, newPos: number) => void;
biggestIndex: number;
className?: string;
};

export function SidebarTabDropTarget({ spaceData, isSpaceLight, moveTab, biggestIndex }: SidebarTabDropTargetProps) {
export function SidebarTabDropTarget({
spaceData,
isSpaceLight,
moveTab,
biggestIndex,
className
}: SidebarTabDropTargetProps) {
const [showDropIndicator, setShowDropIndicator] = useState(false);
const dropTargetRef = useRef<HTMLDivElement>(null);

Expand Down Expand Up @@ -77,7 +85,11 @@ export function SidebarTabDropTarget({ spaceData, isSpaceLight, moveTab, biggest
return (
<>
{showDropIndicator && <DropIndicator isSpaceLight={isSpaceLight} />}
<div className="flex-1 flex flex-col" ref={dropTargetRef} onDoubleClick={handleDoubleClick}></div>
<div
className={cn("flex-1 flex flex-col", className)}
ref={dropTargetRef}
onDoubleClick={handleDoubleClick}
></div>
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export function SpaceSidebar({ space }: { space: Space }) {
isSpaceLight={isSpaceLight}
moveTab={moveTab}
biggestIndex={sortedTabGroups.length - 1}
className="app-drag"
/>
</AnimatePresence>
</div>
Expand Down
Loading