Skip to content

Commit c328cf3

Browse files
committed
mdx chakra list component
1 parent 00a8484 commit c328cf3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/templates/docs.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import {
1515
Box,
1616
useToken,
1717
HeadingProps,
18+
UnorderedList as ChakraUnorderedList,
19+
OrderedList as ChakraOrderedList,
20+
ListProps,
1821
} from "@chakra-ui/react"
1922

2023
import BannerNotification from "../components/BannerNotification"
@@ -123,6 +126,13 @@ const Paragraph = (props: TextProps) => (
123126
<Text fontSize="md" color="text300" mt={8} mb={4} {...props} />
124127
)
125128

129+
const UnorderedList = (props: ListProps) => (
130+
<ChakraUnorderedList ms="1.45rem" {...props} />
131+
)
132+
const OrderedList = (props: ListProps) => (
133+
<ChakraOrderedList ms="1.45rem" {...props} />
134+
)
135+
126136
const ListItem = (props: ListItemProps) => (
127137
<ChakraListItem color="text300" {...props} />
128138
)
@@ -190,6 +200,8 @@ const components = {
190200
h3: H3,
191201
h4: H4,
192202
p: Paragraph,
203+
ul: UnorderedList,
204+
ol: OrderedList,
193205
li: ListItem,
194206
pre: Codeblock,
195207
table: MarkdownTable,

0 commit comments

Comments
 (0)