Files
rickvanlieshout.com/src/components/Sidebar/Menu/Menu.tsx
2022-09-17 20:02:58 +02:00

27 lines
603 B
TypeScript

import { Link } from "gatsby";
import React from "react";
import * as styles from "./Menu.module.scss";
type Props = {
menu: Array<{
label: string;
path: string;
}>;
};
const Menu: React.FC<Props> = ({ menu }: Props) => (
<nav className={`${styles.menu} hideInPrintView`}>
<ul className={styles.list}>
{menu?.map((item) => (
<li className={styles.item} key={item.path}>
<Link to={item.path} className={styles.link} activeClassName={styles.active}>
{item.label}
</Link>
</li>
))}
</ul>
</nav>
);
export default Menu;