From 0ac690339083f01a0b12a74ec117eeccd055e932 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 22 Nov 2023 17:45:03 +0100
Subject: refactor(components,pages): extract MDX components mapping from pages

Instead of repeating the overriding on each pages, we should define
it in one place and reuse it in pages.
By default it is not possible to override native HTML tags with MDX
so I added a plugin in next config to allow it.
---
 src/components/atoms/lists/list/list.tsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

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

diff --git a/src/components/atoms/lists/list/list.tsx b/src/components/atoms/lists/list/list.tsx
index 6e58433..61d2216 100644
--- a/src/components/atoms/lists/list/list.tsx
+++ b/src/components/atoms/lists/list/list.tsx
@@ -16,14 +16,14 @@ type UnorderedListProps = Omit<HTMLAttributes<HTMLUListElement>, 'children'>;
 type BaseListProps<O extends boolean, H extends boolean> = O extends true
   ? OrderedListProps
   : H extends true
-  ? OrderedListProps
-  : UnorderedListProps;
+    ? OrderedListProps
+    : UnorderedListProps;
 
 type AdditionalProps<O extends boolean, H extends boolean> = {
   /**
-   * An array of list items.
+   * The list items.
    */
-  children: ReactNode;
+  children?: ReactNode;
   /**
    * Should the items marker be hidden?
    *
@@ -109,8 +109,8 @@ const ListWithRef = <O extends boolean, H extends boolean>(
     O extends true
       ? HTMLOListElement
       : H extends true
-      ? HTMLOListElement
-      : HTMLUListElement
+        ? HTMLOListElement
+        : HTMLUListElement
   >
 ) => {
   const itemSpacing = spacing === null ? 0 : `var(--spacing-${spacing})`;
-- 
cgit v1.2.3

