2020-08-10 00:13:38 +02:00
|
|
|
import React from 'react';
|
2020-08-09 08:48:43 +02:00
|
|
|
import classNames from 'classnames';
|
2020-08-10 00:13:38 +02:00
|
|
|
import Menu from 'components/common/Menu';
|
2020-08-09 08:48:43 +02:00
|
|
|
import styles from './MenuLayout.module.css';
|
|
|
|
|
2020-08-09 12:04:48 +02:00
|
|
|
export default function MenuLayout({
|
|
|
|
menu,
|
|
|
|
selectedOption,
|
|
|
|
onMenuSelect,
|
|
|
|
className,
|
|
|
|
menuClassName,
|
|
|
|
contentClassName,
|
2020-08-10 00:13:38 +02:00
|
|
|
optionClassName,
|
2020-08-09 12:04:48 +02:00
|
|
|
children,
|
|
|
|
}) {
|
2020-08-09 08:48:43 +02:00
|
|
|
return (
|
2020-08-09 12:04:48 +02:00
|
|
|
<div className={classNames(styles.container, className)}>
|
2020-08-10 00:13:38 +02:00
|
|
|
<Menu
|
|
|
|
options={menu}
|
|
|
|
selectedOption={selectedOption}
|
|
|
|
className={classNames(styles.menu, menuClassName)}
|
|
|
|
selectedClassName={styles.selected}
|
|
|
|
optionClassName={classNames(styles.option, optionClassName)}
|
|
|
|
onSelect={onMenuSelect}
|
|
|
|
/>
|
2020-08-09 12:04:48 +02:00
|
|
|
<div className={classNames(styles.content, contentClassName)}>{children}</div>
|
2020-08-09 08:48:43 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|