2016-08-24 15:09:42 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* LeftMenuLinkContainer
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import LeftMenuLink from 'components/LeftMenuLink';
|
|
|
|
import styles from './styles.scss';
|
|
|
|
|
|
|
|
class LeftMenuLinkContainer extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
|
|
render() {
|
2016-08-26 13:28:12 +02:00
|
|
|
// List of links
|
2016-08-30 10:53:03 +02:00
|
|
|
const links = this.props.plugins.map(plugin => <LeftMenuLink icon={plugin.icon || 'ion-merge'} label={plugin.name} destination={`/${plugin.id}`} isActive={this.props.params.plugin === plugin.id}></LeftMenuLink>);
|
2016-08-24 15:09:42 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={styles.leftMenuLinkContainer}>
|
|
|
|
<p className={styles.title}>Plugins</p>
|
|
|
|
<ul className={styles.list}>
|
|
|
|
{links}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LeftMenuLinkContainer.propTypes = {
|
2016-08-30 10:53:03 +02:00
|
|
|
plugins: React.PropTypes.object
|
2016-08-24 15:09:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export default LeftMenuLinkContainer;
|