From 9fb6db6921a83537d5338f689467d134b6e3e73f Mon Sep 17 00:00:00 2001 From: Caio Cabral Date: Sun, 12 Jan 2025 08:24:09 -0500 Subject: [PATCH] feat: excluding selected path from hover changes --- Client/src/Components/Sidebar/index.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Client/src/Components/Sidebar/index.jsx b/Client/src/Components/Sidebar/index.jsx index a4fe4238d..e6e958de6 100644 --- a/Client/src/Components/Sidebar/index.jsx +++ b/Client/src/Components/Sidebar/index.jsx @@ -187,6 +187,9 @@ function Sidebar() { "& .selected-path": { /* Selected menu item */ backgroundColor: theme.palette.secondary.main, + "&:hover": { + backgroundColor: theme.palette.secondary.main, + }, "& .MuiListItemIcon-root svg path": { /* Selected menu item icon */ stroke: theme.palette.secondary.contrastText, @@ -196,7 +199,7 @@ function Sidebar() { color: theme.palette.secondary.contrastText, }, }, - "& .MuiListItemButton-root": { + "& .MuiListItemButton-root:not(.selected-path)": { transition: "background-color .3s", " &:hover": { /* Hovered menu item bg color */