Files
web/components/Current/Header/TopMenu/index.tsx
2024-05-31 09:27:56 +02:00

33 lines
794 B
TypeScript

import styles from "./topMenu.module.css"
import type { TopMenuProps } from "@/types/components/current/header/topMenu"
export default function TopMenu({
frontpageLinkText,
homeHref,
links,
languageSwitcher,
}: TopMenuProps) {
return (
<div className={styles.topMenu}>
<div className={styles.container}>
<a className={styles.homeLink} href={homeHref}>
{frontpageLinkText}
</a>
<ul className={styles.list}>
<li className={styles.langSwitcher}>{languageSwitcher}</li>
{links.map(({ link }, i) => (
<li key={link.href + i}>
<a className={styles.link} href={link.href}>
{link.title}
</a>
</li>
))}
</ul>
</div>
</div>
)
}