2016-08-24 15:09:42 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* LeftMenuLink
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import styles from './styles.scss';
|
2016-08-25 10:47:15 +02:00
|
|
|
import { Link } from 'react-router';
|
2016-08-24 15:09:42 +02:00
|
|
|
|
|
|
|
class LeftMenuLink extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
|
|
render() {
|
|
|
|
return (
|
2016-08-30 10:53:03 +02:00
|
|
|
<li className={`${styles.leftMenuLink} ${this.props.isActive ? styles.leftMenuLinkActive : ''}`}>
|
2016-08-25 10:47:15 +02:00
|
|
|
<Link className={styles.link} to={this.props.destination}>
|
2016-08-24 15:09:42 +02:00
|
|
|
<i className={`${styles.linkIcon} ${this.props.icon} ion`}></i>
|
|
|
|
<span className={styles.linkLabel}>{this.props.label}</span>
|
2016-08-25 10:47:15 +02:00
|
|
|
</Link>
|
2016-08-24 15:09:42 +02:00
|
|
|
</li>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LeftMenuLink.propTypes = {
|
|
|
|
icon: React.PropTypes.string,
|
|
|
|
label: React.PropTypes.string,
|
|
|
|
destination: React.PropTypes.string,
|
2016-08-30 10:53:03 +02:00
|
|
|
isActive: React.PropTypes.bool,
|
2016-08-24 15:09:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export default LeftMenuLink;
|