mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
18 lines
522 B
JavaScript
18 lines
522 B
JavaScript
import { Menu, Item } from 'react-basics';
|
|
import Link from 'next/link';
|
|
import styles from './SideNav.module.css';
|
|
|
|
export default function SideNav({ selectedKey, items, shallow, onSelect = () => {} }) {
|
|
return (
|
|
<Menu items={items} selectedKey={selectedKey} className={styles.menu} onSelect={onSelect}>
|
|
{({ key, label, url }) => (
|
|
<Item key={key} className={styles.item}>
|
|
<Link href={url} shallow={shallow}>
|
|
{label}
|
|
</Link>
|
|
</Item>
|
|
)}
|
|
</Menu>
|
|
);
|
|
}
|