21 lines
559 B
TypeScript
21 lines
559 B
TypeScript
import Image from "next/image";
|
|
import Link from "next/link";
|
|
|
|
interface ItemProps {
|
|
link: string;
|
|
iconSrc: string;
|
|
label: string;
|
|
isActive: boolean;
|
|
isNavHome?: boolean;
|
|
classname?: string
|
|
}
|
|
|
|
export default function NavItem({ link, iconSrc, label, isActive, isNavHome, classname }: ItemProps) {
|
|
return (
|
|
<>
|
|
<Link href={link} className={`nav-item r-flex-center ${isActive ? "active" : ""} ${classname}`} >
|
|
<Image src={iconSrc} alt={label} className={`scale-100 ${isNavHome ? "nav-home" : ""}`} />
|
|
</Link>
|
|
</>
|
|
);
|
|
}
|