File tree 6 files changed +22
-2
lines changed
6 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 5
5
BasicAnchorMarkdown ,
6
6
StyledMarkdown ,
7
7
StyledMarkdownBlockquote ,
8
+ StyledMarkdownCode ,
8
9
StyledMarkdownH1 ,
9
10
StyledMarkdownH2 ,
10
11
StyledMarkdownH3 ,
@@ -54,7 +55,8 @@ export const RenderMarkdown: React.FC<RenderMarkdownProps> = ({ content }) => {
54
55
li : ( { ...props } ) => < StyledMarkdownLi > { props . children } </ StyledMarkdownLi > ,
55
56
th : ( { ...props } ) => < StyledMarkdownTh > { props . children } </ StyledMarkdownTh > ,
56
57
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 >
58
60
} }
59
61
>
60
62
{ content }
Original file line number Diff line number Diff line change @@ -98,3 +98,12 @@ export const StyledMarkdownPre = styled('pre')(({ theme }) => ({
98
98
whiteSpace : 'pre-line' ,
99
99
fontFamily : 'inherit'
100
100
} ) ) ;
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 @@ -6,3 +6,4 @@ export * from './icons';
6
6
export * from './redux-persist' ;
7
7
export * from './schemas' ;
8
8
export * from './theme' ;
9
+ export * from './utils' ;
Original file line number Diff line number Diff line change @@ -255,6 +255,7 @@ export const lightModePalette: PaletteOptions = {
255
255
tertiary : Colors . red [ 70 ]
256
256
} ,
257
257
code : Colors . charcoal [ 90 ] ,
258
+
258
259
constant : {
259
260
white : Colors . accentGrey [ 100 ] ,
260
261
disabled : Colors . charcoal [ 70 ] ,
@@ -369,7 +370,7 @@ export const darkModePalette: PaletteOptions = {
369
370
secondary : Colors . red [ 20 ] ,
370
371
tertiary : Colors . red [ 10 ]
371
372
} ,
372
- code : Colors . accentGrey [ 90 ] ,
373
+ code : Colors . charcoal [ 10 ] ,
373
374
constant : {
374
375
white : Colors . accentGrey [ 100 ] ,
375
376
disabled : Colors . charcoal [ 70 ] ,
Original file line number Diff line number Diff line change
1
+ export const componentIcon = ( { kind, model, color } ) => {
2
+ if ( ! kind || ! model || ! color ) {
3
+ return null ;
4
+ }
5
+ return `/ui/public/static/img/meshmodels/${ model } /${ color } /${ kind . toLowerCase ( ) } -${ color } .svg` ;
6
+ } ;
Original file line number Diff line number Diff line change
1
+ export * from './components' ;
You can’t perform that action at this time.
0 commit comments