umami/components/layout/MenuLayout.js

32 lines
844 B
JavaScript
Raw Normal View History

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-18 01:46:13 +02:00
<div className={classNames(styles.container, className, 'row')}>
2020-08-10 00:13:38 +02:00
<Menu
options={menu}
selectedOption={selectedOption}
2020-08-18 01:46:13 +02:00
className={classNames(styles.menu, menuClassName, 'col-12 col-lg-3')}
2020-08-10 00:13:38 +02:00
selectedClassName={styles.selected}
optionClassName={classNames(styles.option, optionClassName)}
onSelect={onMenuSelect}
/>
2020-08-18 01:46:13 +02:00
<div className={classNames(styles.content, contentClassName, 'col-12 col-lg-9')}>
{children}
</div>
2020-08-09 08:48:43 +02:00
</div>
);
}