diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-14 19:12:54 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-14 19:24:46 +0200 |
| commit | 15fd9f4a6ecf947c7648c6b7865b97c40124fde1 (patch) | |
| tree | 528ef96e731b0dd9c3c15d398b75f2877473289e /src/components/molecules/nav/nav.tsx | |
| parent | 872b0c172a38db4f440dc6044eb1d5725c03abb1 (diff) | |
chore: add a MainNav component
Diffstat (limited to 'src/components/molecules/nav/nav.tsx')
| -rw-r--r-- | src/components/molecules/nav/nav.tsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/components/molecules/nav/nav.tsx b/src/components/molecules/nav/nav.tsx index 42e3843..6ef9158 100644 --- a/src/components/molecules/nav/nav.tsx +++ b/src/components/molecules/nav/nav.tsx @@ -35,6 +35,10 @@ export type NavProps = { * The navigation kind. */ kind: 'main' | 'footer'; + /** + * Set additional classnames to the navigation list. + */ + listClassName?: string; }; /** @@ -42,7 +46,12 @@ export type NavProps = { * * Render the nav links. */ -const Nav: VFC<NavProps> = ({ className = '', items, kind }) => { +const Nav: VFC<NavProps> = ({ + className = '', + items, + kind, + listClassName = '', +}) => { const kindClass = `nav--${kind}`; /** @@ -63,7 +72,7 @@ const Nav: VFC<NavProps> = ({ className = '', items, kind }) => { return ( <nav className={`${styles[kindClass]} ${className}`}> - <ul className={styles.nav__list}>{getItems()}</ul> + <ul className={`${styles.nav__list} ${listClassName}`}>{getItems()}</ul> </nav> ); }; |
