chore(xo-web): add exact prop to NavLink (#2699)

This commit is contained in:
Julien Fontanet 2018-02-28 17:05:44 +01:00 committed by GitHub
parent db795e91fd
commit 3c247abcf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,9 +3,14 @@ import React from 'react'
import Link from './link'
export const NavLink = ({ children, to }) => (
export const NavLink = ({ children, exact, to }) => (
<li className='nav-item' role='tab'>
<Link className='nav-link' activeClassName='active' to={to}>
<Link
activeClassName='active'
className='nav-link'
onlyActiveOnIndex={exact}
to={to}
>
{children}
</Link>
</li>