Skip to content

Commit

Permalink
NavLink className update (#5109)
Browse files Browse the repository at this point in the history
* append `activeClassName` at end of class attribute ( only for aesthetic purpose  )
* css tip: active-class should be declared after default-class ( css specificity )
  • Loading branch information
carloluis authored and timdorr committed May 12, 2017
1 parent 4325eeb commit cbe2737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-router-dom/modules/NavLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const NavLink = ({
return (
<Link
to={to}
className={isActive ? [ activeClassName, className ].filter(i => i).join(' ') : className}
className={isActive ? [ className, activeClassName ].filter(i => i).join(' ') : className}
style={isActive ? { ...style, ...activeStyle } : style}
{...rest}
/>
Expand Down

0 comments on commit cbe2737

Please sign in to comment.