36 lines
788 B
JavaScript
Raw Normal View History

2017-03-15 11:48:56 +01:00
/**
*
* LeftMenuLinkContainer
*
*/
import React from 'react';
import LeftMenuSubLink from 'components/LeftMenuSubLink';
import styles from './styles.scss';
class LeftMenuSubLinkContainer extends React.Component { // eslint-disable-line react/prefer-stateless-function
render() {
// List of links
let links = this.props.subLinks.map((subLink, i) => (
<LeftMenuSubLink
key={i}
2017-03-18 17:34:00 +01:00
label={subLink.get('label')}
destination={`${this.props.destinationPrefix}/${subLink.get('to')}`}
2017-03-15 11:48:56 +01:00
/>
));
return (
<ul className={styles.list}>
{links}
</ul>
);
}
}
LeftMenuSubLinkContainer.propTypes = {
2017-03-18 17:34:00 +01:00
subLinks: React.PropTypes.object,
destinationPrefix: React.PropTypes.string,
2017-03-15 11:48:56 +01:00
};
export default LeftMenuSubLinkContainer;