Added submenu for admin
This commit is contained in:
parent
06d69c2cae
commit
7f6f603103
@ -5,7 +5,8 @@ import { useState } from "react";
|
|||||||
import { PAGE_LINKS } from "@/app/features/dashboard/sidebar/SidebarLink.constants";
|
import { PAGE_LINKS } from "@/app/features/dashboard/sidebar/SidebarLink.constants";
|
||||||
import PageLinks from "../../../components/PageLinks/PageLinks";
|
import PageLinks from "../../../components/PageLinks/PageLinks";
|
||||||
import "./sideBar.scss";
|
import "./sideBar.scss";
|
||||||
import clsx from "clsx";
|
import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight";
|
||||||
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
||||||
|
|
||||||
const SideBar = () => {
|
const SideBar = () => {
|
||||||
const [openMenus, setOpenMenus] = useState<Record<string, boolean>>({});
|
const [openMenus, setOpenMenus] = useState<Record<string, boolean>>({});
|
||||||
@ -33,7 +34,11 @@ const SideBar = () => {
|
|||||||
{link.icon && <link.icon />}
|
{link.icon && <link.icon />}
|
||||||
<span className="sidebar__text">{link.title}</span>
|
<span className="sidebar__text">{link.title}</span>
|
||||||
<span className="sidebar__arrow">
|
<span className="sidebar__arrow">
|
||||||
{openMenus[link.title] ? "▲" : "▼"}
|
{!openMenus[link.title] ? (
|
||||||
|
<KeyboardArrowRightIcon />
|
||||||
|
) : (
|
||||||
|
<KeyboardArrowDownIcon />
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
{openMenus[link.title] && (
|
{openMenus[link.title] && (
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
transition: color 0.2s ease;
|
transition: color 0.2s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--primary-color); // Define your highlight color in variables
|
color: var(--primary-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user