diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-22 17:45:03 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-22 17:46:32 +0100 |
| commit | 0ac690339083f01a0b12a74ec117eeccd055e932 (patch) | |
| tree | 539ffee3b35b086a8c035e5abc916ab603fe0001 /src/components/atoms/lists | |
| parent | d4045fbcbfa8208ec31539744417f315f1f6fad8 (diff) | |
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.
Diffstat (limited to 'src/components/atoms/lists')
| -rw-r--r-- | src/components/atoms/lists/list/list.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
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})`; |
