From d9bf6f0d69ecb4475c06c772ef6314e5a7ee0fe8 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 15 Apr 2022 16:32:55 +0200
Subject: chore: add a LinksListWidget component

---
 src/components/atoms/lists/list.tsx | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

(limited to 'src/components/atoms/lists/list.tsx')

diff --git a/src/components/atoms/lists/list.tsx b/src/components/atoms/lists/list.tsx
index 74ab8b0..d100a31 100644
--- a/src/components/atoms/lists/list.tsx
+++ b/src/components/atoms/lists/list.tsx
@@ -18,13 +18,17 @@ export type ListItem = {
 
 export type ListProps = {
   /**
-   * Set additional classnames to the list wrapper
+   * Set additional classnames to the list wrapper.
    */
   className?: string;
   /**
    * An array of list items.
    */
   items: ListItem[];
+  /**
+   * Set additional classnames to the list items.
+   */
+  itemsClassName?: string;
   /**
    * The list kind (ordered or unordered).
    */
@@ -41,8 +45,9 @@ export type ListProps = {
  * Render either an ordered or an unordered list.
  */
 const List: VFC<ListProps> = ({
-  className,
+  className = '',
   items,
+  itemsClassName = '',
   kind = 'unordered',
   withMargin = true,
 }) => {
@@ -57,7 +62,7 @@ const List: VFC<ListProps> = ({
    */
   const getItems = (array: ListItem[]): JSX.Element[] => {
     return array.map(({ child, id, value }) => (
-      <li key={id} className={styles.list__item}>
+      <li key={id} className={`${styles.list__item} ${itemsClassName}`}>
         {value}
         {child && (
           <ListTag
-- 
cgit v1.2.3

