2018-08-06 22:16:36 +02:00
|
|
|
import React from 'react';
|
|
|
|
import { Drawer, Icon, Navigation } from 'react-mdl';
|
|
|
|
import { NavLink } from 'react-router-dom';
|
|
|
|
import styles from '../styles.scss';
|
|
|
|
|
|
|
|
import { baseRoutes as routes } from './routes';
|
|
|
|
|
|
|
|
export const DrawerMenu = () => (
|
|
|
|
<Drawer className="mdl-color--white">
|
|
|
|
<span className={[styles.drawerTitle, 'mdl-layout-title'].join(' ')}>
|
|
|
|
<img src="public/logo.png" width="32" height="32" className={styles.drawerTitleLogo} />
|
|
|
|
<span className={styles.drawerTitleText}>Unleash</span>
|
|
|
|
</span>
|
|
|
|
<hr />
|
|
|
|
<Navigation className={styles.navigation}>
|
|
|
|
{routes.map(item => (
|
|
|
|
<NavLink
|
|
|
|
key={item.path}
|
|
|
|
to={item.path}
|
2019-03-11 21:10:45 +01:00
|
|
|
className={[styles.navigationLink, 'mdl-color-text--grey-900'].join(' ')}
|
|
|
|
activeClassName={[styles.navigationLink, 'mdl-color-text--black', 'mdl-color--blue-grey-100'].join(
|
2019-03-06 19:27:58 +01:00
|
|
|
' '
|
|
|
|
)}
|
2018-08-06 22:16:36 +02:00
|
|
|
>
|
|
|
|
<Icon name={item.icon} className={styles.navigationIcon} /> {item.title}
|
|
|
|
</NavLink>
|
|
|
|
))}
|
|
|
|
</Navigation>
|
|
|
|
<hr />
|
|
|
|
<Navigation className={styles.navigation}>
|
2019-03-06 19:27:58 +01:00
|
|
|
<a
|
|
|
|
href="https://unleash.github.io"
|
|
|
|
target="_blank"
|
2019-03-11 21:10:45 +01:00
|
|
|
className={[styles.navigationLink, 'mdl-color-text--grey-900'].join(' ')}
|
2019-03-06 19:27:58 +01:00
|
|
|
>
|
|
|
|
<Icon name="library_books" className={styles.navigationIcon} /> User documentation
|
|
|
|
</a>
|
2018-08-06 22:16:36 +02:00
|
|
|
<a
|
|
|
|
href="https://github.com/Unleash"
|
|
|
|
target="_blank"
|
2019-03-11 21:10:45 +01:00
|
|
|
className={[styles.navigationLink, 'mdl-color-text--grey-900'].join(' ')}
|
2018-08-06 22:16:36 +02:00
|
|
|
>
|
2019-03-11 21:10:45 +01:00
|
|
|
<i className={['material-icons', styles.navigationIcon, styles.iconGitHub].join(' ')} /> GitHub
|
2018-08-06 22:16:36 +02:00
|
|
|
</a>
|
|
|
|
</Navigation>
|
|
|
|
</Drawer>
|
|
|
|
);
|