import { Children , PropsWithChildren , ReactElement } from "react" ; import { UnorderedListStyled , OrderedListStyled , UnorderedListBullet , } from "@/components/mdx/styles" ; export const ListItem = ( { children , ... props } ) => { return ( < li { ... props } > < UnorderedListBullet /> < span > { children } < /span> < /li>); } ; export const UnorderedList = ( { children , ... props } ) => { return ( < UnorderedListStyled { ... props } > { Children . map ( children as ReactElement , ( { props } ) => typeof props === "undefined" ? null : < ListItem { ... props } / > ) } < /UnorderedListStyled>); } ; export const OrderedList = ( { children , ... props } ) => { return < OrderedListStyled { ... props } > { children } < /OrderedListStyled>; } ;