2019-08-07 06:02:36 +01:00
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
import Icon from '../../components/icon';
|
|
|
|
|
2019-08-09 17:06:27 +01:00
|
|
|
import './column_link.scss';
|
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
export default class ColumnLink extends PureComponent {
|
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
icon: PropTypes.string.isRequired,
|
|
|
|
text: PropTypes.string.isRequired,
|
|
|
|
to: PropTypes.string,
|
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const { to, icon, text } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Link to={to} className='column-link'>
|
|
|
|
<Icon id={icon} fixedWidth className='column-link__icon' />
|
|
|
|
{text}
|
|
|
|
</Link>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|