index_20190417222207.js 614 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import React, { Component } from 'react'
import { NavLink } from 'react-router-dom';
import styles from './index.scss'

export default class NavLinks extends Component {
    render() {
        const { pathUrl, active, icoName, linkName, ...rest } = this.props;
        return (
            <NavLink
                {...rest}
                to={pathUrl}
                activeClassName={active}
                className={styles.root}
            >
                <i className={icoName + ' ' + styles.ico} />
                <span className={styles.text}>{linkName}</span>
            </NavLink>
        )
    }
}