1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 05:18:28 -04:00
jarv.is/components/MenuLink/MenuLink.tsx
Jake Jarvis 283eb62446
less corny header and note meta icons (#746)
* less corny header and note meta icons

* swap out more twemojis

* indicate active page in nav bar

* update favicons

* extract `<MenuLink />` into its own component

* change hover effect to an underline

* cropped header photo
2022-01-27 10:06:26 -05:00

25 lines
589 B
TypeScript

import classNames from "classnames/bind";
import Link from "next/link";
import { ReactNode } from "react";
import styles from "./MenuLink.module.css";
const cx = classNames.bind(styles);
type Props = {
href: string;
icon: ReactNode;
text: string;
current?: boolean;
className?: string;
};
const MenuLink = ({ href, icon, text, current, className }: Props) => (
<Link href={href} prefetch={false}>
<a className={cx(styles.link, { current: !!current }, className)}>
{icon} <span className={styles.label}>{text}</span>
</a>
</Link>
);
export default MenuLink;