diff --git a/src/components/Graph/AnalysisWindow/AnalysisWindow.tsx b/src/components/Graph/AnalysisWindow/AnalysisWindow.tsx index 498e3bf3..1715bee3 100644 --- a/src/components/Graph/AnalysisWindow/AnalysisWindow.tsx +++ b/src/components/Graph/AnalysisWindow/AnalysisWindow.tsx @@ -1,4 +1,5 @@ -import { FC, createContext, useRef } from "react"; +import { FC, createContext, useRef, useState, useEffect } from "react"; +import clsx from "clsx"; import Draggable from "react-draggable"; import Content from "./Content"; @@ -24,6 +25,13 @@ const DraggableWindow: FC = ({ analysisData, setFocusedAddressData, }) => { + const [hasBeenHovered, setHasBeenHovered] = useState(false); + const nodeRef = useRef(null); + + useEffect(() => { + setHasBeenHovered(false); + }, [analysisData]); + if (analysisData === null) { return null; } @@ -33,14 +41,18 @@ const DraggableWindow: FC = ({ address: analysisData.address, }; - const nodeRef = useRef(null); - return (
-
+
setHasBeenHovered(true)} + >
setFocusedAddressData(null)} />
diff --git a/src/components/Graph/AnalysisWindow/Content/Content.tsx b/src/components/Graph/AnalysisWindow/Content/Content.tsx index 59894380..0df5edc3 100644 --- a/src/components/Graph/AnalysisWindow/Content/Content.tsx +++ b/src/components/Graph/AnalysisWindow/Content/Content.tsx @@ -1,7 +1,7 @@ import { FC, useState, useContext, useEffect } from "react"; import { Transition } from "@headlessui/react"; - import { BLOCKCHAIN_TABS, Tab } from "./Tab"; +import "./Scrollbar.css"; import Navbar from "./Navbar"; import LoadingPulseMock from "./PulseMock"; @@ -78,7 +78,10 @@ const Content: FC = () => { />
-
+
diff --git a/src/components/Graph/AnalysisWindow/Content/Scrollbar.css b/src/components/Graph/AnalysisWindow/Content/Scrollbar.css new file mode 100644 index 00000000..757452b2 --- /dev/null +++ b/src/components/Graph/AnalysisWindow/Content/Scrollbar.css @@ -0,0 +1,20 @@ +/* Style for the scrollbar track */ +.content-component::-webkit-scrollbar-track { + background-color: #f3f4f6; /* Light grey track */ +} + +/* Style for the scrollbar thumb */ +.content-component::-webkit-scrollbar-thumb { + background-color: #94a3b8; /* Darker grey thumb */ + border-radius: 10px; /* Rounded corners for the thumb */ +} + +/* Style for when the scrollbar thumb is hovered */ +.content-component::-webkit-scrollbar-thumb:hover { + background-color: #64748b; /* Even darker color on hover */ +} + +/* Set the width of the scrollbar */ +.content-component::-webkit-scrollbar { + width: 8px; /* Adjust the width as needed */ +}