2023-12-17 17:54:33 -06:00
|
|
|
import Link from "next/link";
|
|
|
|
|
2023-12-17 22:55:38 -06:00
|
|
|
export default function SidebarHighlightLink({
|
|
|
|
title,
|
|
|
|
href,
|
|
|
|
icon,
|
|
|
|
active,
|
|
|
|
}: {
|
|
|
|
title: string;
|
|
|
|
href: string;
|
|
|
|
icon: string;
|
|
|
|
active?: boolean;
|
2023-12-17 17:54:33 -06:00
|
|
|
}) {
|
|
|
|
return (
|
|
|
|
<Link href={href}>
|
|
|
|
<div
|
2024-08-14 18:23:51 -05:00
|
|
|
title={title}
|
2023-12-17 17:54:33 -06:00
|
|
|
className={`${
|
2023-12-17 22:55:38 -06:00
|
|
|
active || false
|
|
|
|
? "bg-primary/20"
|
|
|
|
: "bg-neutral-content/20 hover:bg-neutral/20"
|
|
|
|
} duration-200 px-3 py-2 cursor-pointer gap-2 w-full rounded-lg capitalize`}
|
2023-12-17 17:54:33 -06:00
|
|
|
>
|
2023-12-17 22:55:38 -06:00
|
|
|
<div
|
|
|
|
className={
|
|
|
|
"w-10 h-10 inline-flex items-center justify-center bg-black/10 dark:bg-white/5 rounded-full"
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<i className={`${icon} text-primary text-2xl drop-shadow`}></i>
|
2023-12-17 17:54:33 -06:00
|
|
|
</div>
|
|
|
|
<div className={"mt-1"}>
|
2024-08-14 18:23:51 -05:00
|
|
|
<p className="truncate w-full font-semibold text-xs">{title}</p>
|
2023-12-17 17:54:33 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Link>
|
2023-12-17 22:55:38 -06:00
|
|
|
);
|
|
|
|
}
|