Skip to content

Commit

Permalink
fix: add figure component to markdown rendering (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeesoPost authored May 13, 2024
1 parent 65cc487 commit 74fd9f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/src/components/Markdown/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OrderedList, TableContainer } from '@utrecht/component-library-react';
import { Figure, OrderedList, TableContainer } from '@utrecht/component-library-react';
import {
Heading1,
Heading2,
Expand Down Expand Up @@ -116,6 +116,10 @@ const defaultComponents = (config?: Components) => {
delete node.properties?.style;
return <TableCaption {...node.properties}>{children}</TableCaption>;
},
figure: ({ children, node }) => {
delete node.properties?.style;
return <Figure {...node.properties}>{children}</Figure>;
},
figcaption: ({ children, node }) => {
delete node.properties?.style;
return (
Expand Down

0 comments on commit 74fd9f3

Please sign in to comment.