mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
New mobile menu.
This commit is contained in:
parent
18efd4d101
commit
34ad1d9c39
14 changed files with 189 additions and 153 deletions
21
components/common/MobileMenu.js
Normal file
21
components/common/MobileMenu.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import Link from './Link';
|
||||
import Button from './Button';
|
||||
import XMark from 'assets/xmark.svg';
|
||||
import styles from './MobileMenu.module.css';
|
||||
|
||||
export default function MobileMenu({ items = [], onClose }) {
|
||||
return (
|
||||
<div className={styles.menu}>
|
||||
<div className={styles.header}>
|
||||
<Button className={styles.button} icon={<XMark />} onClick={onClose} />
|
||||
</div>
|
||||
<div className={styles.items}>
|
||||
{items.map(({ label, value }) => (
|
||||
<Link key={value} href={value} className={styles.item} onClick={onClose}>
|
||||
{label}
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue