import React from 'react';
import { Drawer, Icon, Navigation } from 'react-mdl';
import { NavLink } from 'react-router-dom';
import PropTypes from 'prop-types';
import styles from '../styles.scss';
import { baseRoutes as routes } from './routes';
function getIcon(name) {
if (name === 'c_github') {
return ;
} else {
return ;
}
}
function renderLink(link) {
if (link.path) {
return (
{getIcon(link.icon)} {link.value}
);
} else {
return (
{getIcon(link.icon)} {link.value}
);
}
}
export const DrawerMenu = ({ links = [] }) => (
Unleash
{routes.map(item => (
{item.title}
))}
{links.map(renderLink)}
);
DrawerMenu.propTypes = {
links: PropTypes.array,
};