From f0b3f5a0d88194c7c35c4d37975bbd7f610a5023 Mon Sep 17 00:00:00 2001 From: Carter Date: Fri, 28 Mar 2025 10:58:54 -0600 Subject: [PATCH] using normal tabs for now instead of animated, did some highlighting to make it more obvious what where the tab is being dropped --- src/bin/BinYards.tsx | 4 ++-- src/common/DraggableTabs.tsx | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/bin/BinYards.tsx b/src/bin/BinYards.tsx index f0dfb3a..1da27cb 100644 --- a/src/bin/BinYards.tsx +++ b/src/bin/BinYards.tsx @@ -547,7 +547,7 @@ export default function BinYard(props: Props) { )} - { moveLeft(yardIndex); setMenuAnchorEl(null); @@ -570,7 +570,7 @@ export default function BinYard(props: Props) { - + */} {permissions.includes(pond.Permission.PERMISSION_USERS) && ( { diff --git a/src/common/DraggableTabs.tsx b/src/common/DraggableTabs.tsx index c7d8112..b89db30 100644 --- a/src/common/DraggableTabs.tsx +++ b/src/common/DraggableTabs.tsx @@ -1,6 +1,6 @@ -import { Tabs, TabsProps } from "@mui/material"; +import { darken, Tabs, TabsProps } from "@mui/material"; import React, { useEffect, useState, useRef } from "react"; -import AnimatedTabs from "./AnimatedTabs"; +// import AnimatedTabs from "./AnimatedTabs"; interface DraggableTabsProps extends TabsProps { children: React.ReactNode; @@ -96,6 +96,13 @@ export default function DraggableTabs(props: DraggableTabsProps) { onDragStart: (e: React.DragEvent) => handleDragStart(e, currentIndex), onDragOver: (e: React.DragEvent) => handleDragOver(e, currentIndex), onDrop: handleDrop, + style: { + ...(hoveredIndex === currentIndex && { + background: "rgba(150, 150, 150, 0.1)", + border: "1px double blue", + borderStyle: "hidden hidden hidden dotted", + }), + }, }); } return child; @@ -104,5 +111,6 @@ export default function DraggableTabs(props: DraggableTabsProps) { const orderedChildren = tabOrder.map((index) => enhancedChildren[index]); const allTabs = [...startTabs, ...orderedChildren, ...endTabs]; - return {allTabs}; + // return {allTabs}; + return {allTabs}; } \ No newline at end of file