mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
23 lines
662 B
JavaScript
23 lines
662 B
JavaScript
import classNames from 'classnames';
|
|
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={classNames(styles.menu, 'container')}>
|
|
<div className={styles.header}>
|
|
<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>
|
|
);
|
|
}
|