File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 StyledMarkdownH6 ,
1313 StyledMarkdownLi ,
1414 StyledMarkdownP ,
15+ StyledMarkdownPre ,
1516 StyledMarkdownTd ,
1617 StyledMarkdownTh ,
1718 StyledMarkdownTooltipP ,
@@ -51,7 +52,8 @@ export const RenderMarkdown: React.FC<RenderMarkdownProps> = ({ content }) => {
5152 ul : ( { ...props } ) => < StyledMarkdownUl > { props . children } </ StyledMarkdownUl > ,
5253 li : ( { ...props } ) => < StyledMarkdownLi > { props . children } </ StyledMarkdownLi > ,
5354 th : ( { ...props } ) => < StyledMarkdownTh > { props . children } </ StyledMarkdownTh > ,
54- td : ( { ...props } ) => < StyledMarkdownTd > { props . children } </ StyledMarkdownTd >
55+ td : ( { ...props } ) => < StyledMarkdownTd > { props . children } </ StyledMarkdownTd > ,
56+ pre : ( { ...props } ) => < StyledMarkdownPre > { props . children } </ StyledMarkdownPre >
5557 } }
5658 >
5759 { content }
Original file line number Diff line number Diff line change @@ -71,3 +71,8 @@ export const StyledMarkdownTd = styled('td')(({ theme }) => ({
7171 marginBlock : '0px' ,
7272 ...theme . typography . textB1Regular
7373} ) ) ;
74+
75+ export const StyledMarkdownPre = styled ( 'pre' ) ( ( { theme } ) => ( {
76+ background : theme . palette . background . code ,
77+ whiteSpace : 'pre-line'
78+ } ) ) ;
You can’t perform that action at this time.
0 commit comments