From f9297f142e97b91bd690e9496c52cf4528928c49 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Fri, 9 Oct 2020 17:41:35 -0400 Subject: [PATCH] : allow `className` and `activeClass` props (#386) * : allow `className` and `activeClass` props Fixes #365 * Update index.js --- match/src/index.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/match/src/index.js b/match/src/index.js index 0a5d4699..e5ef67b4 100644 --- a/match/src/index.js +++ b/match/src/index.js @@ -24,12 +24,16 @@ export class Match extends Component { } } -export const Link = ({ activeClassName, path, ...props }) => ( - - { ({ matches }) => ( - - ) } - -); +export function Link({ class: c, className, activeClass, activeClassName, path, ...props }) { + const inactive = [c, className].filter(Boolean).join(' '); + const active = [c, className, activeClass, activeClassName].filter(Boolean).join(' '); + return ( + + { ({ matches }) => ( + + ) } + + ); +} export default Match;