From cbe273758a7e4bd1b7b359e363f29778e750e72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carloluis=20Rodr=C3=ADguez?= Date: Fri, 12 May 2017 17:52:36 -0300 Subject: [PATCH] NavLink className update (#5109) * append `activeClassName` at end of class attribute ( only for aesthetic purpose ) * css tip: active-class should be declared after default-class ( css specificity ) --- packages/react-router-dom/modules/NavLink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-router-dom/modules/NavLink.js b/packages/react-router-dom/modules/NavLink.js index dc3287075c..45dfc6c2ab 100644 --- a/packages/react-router-dom/modules/NavLink.js +++ b/packages/react-router-dom/modules/NavLink.js @@ -29,7 +29,7 @@ const NavLink = ({ return ( i).join(' ') : className} + className={isActive ? [ className, activeClassName ].filter(i => i).join(' ') : className} style={isActive ? { ...style, ...activeStyle } : style} {...rest} />