mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-11-11 14:06:47 +01:00
refactor(starter): upgrade and move to typescript
This commit is contained in:
@@ -2,24 +2,24 @@ import React from "react";
|
||||
|
||||
import { Link } from "gatsby";
|
||||
|
||||
import styles from "./Menu.module.scss";
|
||||
import * as styles from "./Menu.module.scss";
|
||||
|
||||
type Props = {
|
||||
menu: {
|
||||
menu: Array<{
|
||||
label: string;
|
||||
path: string;
|
||||
}[];
|
||||
}>;
|
||||
};
|
||||
|
||||
const Menu: React.FC<Props> = ({ menu }: Props) => (
|
||||
<nav className={styles.menu}>
|
||||
<ul className={styles.menu__list}>
|
||||
<ul className={styles.list}>
|
||||
{menu.map(item => (
|
||||
<li className={styles["menu__list-item"]} key={item.path}>
|
||||
<li className={styles.item} key={item.path}>
|
||||
<Link
|
||||
to={item.path}
|
||||
className={styles["menu__list-item-link"]}
|
||||
activeClassName={styles["menu__list-item-link--active"]}
|
||||
className={styles.link}
|
||||
activeClassName={styles.active}
|
||||
>
|
||||
{item.label}
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user