This commit is contained in:
Mitchell Magro 2025-06-29 22:22:15 +02:00
parent 1b8b238d09
commit 6a879a747c
3 changed files with 19 additions and 31 deletions

View File

@ -5,19 +5,10 @@ import { ISidebarLink } from "@/app/features/dashboard/sidebar/SidebarLink.inter
import clsx from "clsx"; // Utility to merge class names import clsx from "clsx"; // Utility to merge class names
import "./PageLinks.scss"; import "./PageLinks.scss";
interface PageLinksProps extends ISidebarLink { export default function PageLinks({ title, path, icon: Icon }: ISidebarLink) {
className?: string;
}
export default function PageLinks({
title,
path,
icon: Icon,
className,
}: PageLinksProps) {
return ( return (
<Link href={path} passHref legacyBehavior> <Link href={path} passHref legacyBehavior>
<a className={clsx("link-container", className)}> <a className={clsx("link-container")}>
{Icon && <Icon />} {Icon && <Icon />}
<span className="link-text">{title}</span> <span className="link-text">{title}</span>
</a> </a>

View File

@ -1,8 +1,9 @@
/* DropDown.scss */ /* DropDown.scss */
.dropdown-container {
.link-container-text { .link-container {
color: var(--text-primary); color: var(--text-secondary);
span { .link-text {
color: var(--text-primary); color: var(--text-primary);
}
} }
} }

View File

@ -41,21 +41,17 @@ export default function SidebarDropdown({ onChange }: Props) {
}, },
}} }}
> >
<MenuItem value="" disabled> <MenuItem value="" disabled></MenuItem>
{/* <Em className="em"> <div className="dropdown-container">
Select a page {SIDEBAR_LINKS.map((link: ISidebarLink) => (
<ChevronRightIcon fontSize="small" sx={{ ml: 1 }} /> <PageLinks
</Em> */} key={link.path}
</MenuItem> title={link.title}
{SIDEBAR_LINKS.map((link: ISidebarLink) => ( path={link.path}
<PageLinks icon={link.icon}
key={link.path} />
title={link.title} ))}
path={link.path} </div>
icon={link.icon}
className="link-container-text"
/>
))}
</Select> </Select>
</FormControl> </FormControl>
); );