File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ const CodeEditor = (props) => {
4141 getLineProps,
4242 getTokenProps,
4343 style : _style ,
44+ theme : _theme ,
4445 } ) => (
4546 < pre
4647 className = { _className }
@@ -49,7 +50,10 @@ const CodeEditor = (props) => {
4950 outline : "none" ,
5051 padding : 10 ,
5152 fontFamily : "inherit" ,
52- ...( ! props . className || ! props . theme ? { } : _style ) ,
53+ ...( _theme && typeof _theme . plain === "object"
54+ ? _theme . plain
55+ : { } ) ,
56+ ..._style ,
5357 } }
5458 ref = { editorRef }
5559 spellCheck = "false"
Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ export const Default = DefaultTemplate.bind({});
226226Default . args = {
227227 ...defaultControls ,
228228 code : code ,
229+ theme : theme ,
229230} ;
230231
231232export const FunctionExample = StyledPreviewTemplate . bind ( { } ) ;
You can’t perform that action at this time.
0 commit comments