File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 BasicAnchorMarkdown ,
66 StyledMarkdown ,
77 StyledMarkdownBlockquote ,
8+ StyledMarkdownCode ,
89 StyledMarkdownH1 ,
910 StyledMarkdownH2 ,
1011 StyledMarkdownH3 ,
@@ -54,7 +55,8 @@ export const RenderMarkdown: React.FC<RenderMarkdownProps> = ({ content }) => {
5455 li : ( { ...props } ) => < StyledMarkdownLi > { props . children } </ StyledMarkdownLi > ,
5556 th : ( { ...props } ) => < StyledMarkdownTh > { props . children } </ StyledMarkdownTh > ,
5657 td : ( { ...props } ) => < StyledMarkdownTd > { props . children } </ StyledMarkdownTd > ,
57- pre : ( { ...props } ) => < StyledMarkdownPre > { props . children } </ StyledMarkdownPre >
58+ pre : ( { ...props } ) => < StyledMarkdownPre > { props . children } </ StyledMarkdownPre > ,
59+ code : ( { ...props } ) => < StyledMarkdownCode > { props . children } </ StyledMarkdownCode >
5860 } }
5961 >
6062 { content }
Original file line number Diff line number Diff line change @@ -98,3 +98,12 @@ export const StyledMarkdownPre = styled('pre')(({ theme }) => ({
9898 whiteSpace : 'pre-line' ,
9999 fontFamily : 'inherit'
100100} ) ) ;
101+
102+ export const StyledMarkdownCode = styled ( 'code' ) ( ( { theme } ) => ( {
103+ background : theme . palette . background . code ,
104+ whiteSpace : 'pre-line' ,
105+ padding : '1.5px' ,
106+ paddingInline : '5px' ,
107+ fontFamily : 'inherit' ,
108+ borderRadius : 3
109+ } ) ) ;
Original file line number Diff line number Diff line change @@ -255,6 +255,7 @@ export const lightModePalette: PaletteOptions = {
255255 tertiary : Colors . red [ 70 ]
256256 } ,
257257 code : Colors . charcoal [ 90 ] ,
258+
258259 constant : {
259260 white : Colors . accentGrey [ 100 ] ,
260261 disabled : Colors . charcoal [ 70 ] ,
@@ -369,7 +370,7 @@ export const darkModePalette: PaletteOptions = {
369370 secondary : Colors . red [ 20 ] ,
370371 tertiary : Colors . red [ 10 ]
371372 } ,
372- code : Colors . accentGrey [ 90 ] ,
373+ code : Colors . charcoal [ 10 ] ,
373374 constant : {
374375 white : Colors . accentGrey [ 100 ] ,
375376 disabled : Colors . charcoal [ 70 ] ,
You can’t perform that action at this time.
0 commit comments