mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-11-11 14:06:47 +01:00
refactor(starter): upgrade to new version of gatsby
This commit is contained in:
32
src/components/Sidebar/Menu/Menu.tsx
Normal file
32
src/components/Sidebar/Menu/Menu.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import React from "react";
|
||||
|
||||
import { Link } from "gatsby";
|
||||
|
||||
import styles from "./Menu.module.scss";
|
||||
|
||||
type Props = {
|
||||
menu: {
|
||||
label: string;
|
||||
path: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
const Menu: React.FC<Props> = ({ menu }: Props) => (
|
||||
<nav className={styles.menu}>
|
||||
<ul className={styles.menu__list}>
|
||||
{menu.map(item => (
|
||||
<li className={styles["menu__list-item"]} key={item.path}>
|
||||
<Link
|
||||
to={item.path}
|
||||
className={styles["menu__list-item-link"]}
|
||||
activeClassName={styles["menu__list-item-link--active"]}
|
||||
>
|
||||
{item.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
);
|
||||
|
||||
export default Menu;
|
||||
Reference in New Issue
Block a user