2022-03-12 01:04:05 +01:00
|
|
|
import classNames from 'classnames';
|
2023-01-31 06:44:07 +01:00
|
|
|
import Link from 'next/link';
|
|
|
|
import { Button, Icon } from 'react-basics';
|
|
|
|
import Icons from 'components/icons';
|
2022-03-01 03:39:37 +01:00
|
|
|
import styles from './MobileMenu.module.css';
|
|
|
|
|
|
|
|
export default function MobileMenu({ items = [], onClose }) {
|
|
|
|
return (
|
2023-01-31 06:44:07 +01:00
|
|
|
<div className={classNames(styles.menu)}>
|
2022-03-01 03:39:37 +01:00
|
|
|
<div className={styles.header}>
|
2023-01-31 06:44:07 +01:00
|
|
|
<Button onClick={onClose}>
|
|
|
|
<Icon>
|
|
|
|
<Icons.Close />
|
|
|
|
</Icon>
|
|
|
|
</Button>
|
2022-03-01 03:39:37 +01:00
|
|
|
</div>
|
|
|
|
<div className={styles.items}>
|
|
|
|
{items.map(({ label, value }) => (
|
2023-03-09 05:23:32 +01:00
|
|
|
<Link key={value} href={value} className={styles.item} onClick={onClose}>
|
|
|
|
{label}
|
2022-03-01 03:39:37 +01:00
|
|
|
</Link>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|