2023-02-24 11:32:28 -06:00
|
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
|
|
import { IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
|
|
import { MouseEventHandler } from "react";
|
2023-03-05 15:03:20 -06:00
|
|
|
import Link from "next/link";
|
2023-02-24 11:32:28 -06:00
|
|
|
|
|
|
|
interface SidebarItemProps {
|
2023-03-05 15:03:20 -06:00
|
|
|
text: string;
|
2023-02-24 11:32:28 -06:00
|
|
|
icon: IconProp;
|
2023-03-05 15:03:20 -06:00
|
|
|
path: string;
|
2023-02-24 11:32:28 -06:00
|
|
|
}
|
|
|
|
|
2023-03-05 15:03:20 -06:00
|
|
|
export default function ({ text, icon, path }: SidebarItemProps) {
|
2023-02-24 11:32:28 -06:00
|
|
|
return (
|
2023-03-05 15:03:20 -06:00
|
|
|
<Link href={path}>
|
2023-03-10 23:10:10 -06:00
|
|
|
<div className="hover:bg-gray-50 hover:outline outline-sky-100 outline-1 duration-100 rounded my-1 p-3 cursor-pointer flex items-center gap-2">
|
2023-03-05 15:03:20 -06:00
|
|
|
<FontAwesomeIcon icon={icon} className="w-4 text-sky-300" />
|
2023-03-10 13:25:33 -06:00
|
|
|
<p className="text-sky-900">{text}</p>
|
2023-03-05 15:03:20 -06:00
|
|
|
</div>
|
|
|
|
</Link>
|
2023-02-24 11:32:28 -06:00
|
|
|
);
|
|
|
|
}
|