export default function NavBarItem({
                                       active = false,
                                       children,
                                       onClick,
                                   }: {
    active?: boolean;
    children: React.ReactNode;
    onClick: (event: React.MouseEvent<HTMLAnchorElement>) => void;
}) {
    return (
        <li>
            <a
                href="#"
                className={active ? "active" : ""}
                onClick={(e) => {
                    e.preventDefault();
                    onClick(e);
                }}
            >
                {children}
            </a>
        </li>
    );
}
