From 15fd9f4a6ecf947c7648c6b7865b97c40124fde1 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 14 Apr 2022 19:12:54 +0200
Subject: chore: add a MainNav component

---
 src/components/molecules/nav/nav.tsx | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'src/components/molecules/nav/nav.tsx')

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>
   );
 };
-- 
cgit v1.2.3

