From c3cde71e60ae22d17c1d162f678f592915ac5398 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 19 Oct 2023 19:30:54 +0200 Subject: refactor(components): rewrite NavLink component * handle style variants to avoid declaring the styles in consumers --- src/components/molecules/nav/nav-list.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/components/molecules/nav/nav-list.tsx') diff --git a/src/components/molecules/nav/nav-list.tsx b/src/components/molecules/nav/nav-list.tsx index b3c7138..a6acdcf 100644 --- a/src/components/molecules/nav/nav-list.tsx +++ b/src/components/molecules/nav/nav-list.tsx @@ -49,8 +49,7 @@ export const NavList: FC = ({ listClassName = '', ...props }) => { - const kindClass = `nav--${kind}`; - const navClass = `${styles.nav} ${styles[kindClass]} ${className}`; + const navClass = [styles[`nav--${kind}`], className].join(' '); /** * Get the nav items. @@ -60,7 +59,7 @@ export const NavList: FC = ({ items.map(({ id, href, label, logo }) => ( {kind === 'main' ? ( - + ) : ( {label} )} -- cgit v1.2.3