File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const Counter = () => {
51
51
);
52
52
};` ;
53
53
54
- const CodeEditor = styled ( CodeMirror ) `
54
+ const CodeEditor = styled . div `
55
55
border-radius: 0.375rem;
56
56
overflow: hidden;
57
57
position: relative;
@@ -75,16 +75,19 @@ export function Component() {
75
75
. join ( '-' )
76
76
. replace ( / - l i g h t $ / , '/light' )
77
77
. replace ( / - d a r k $ / , '/dark' ) ;
78
+ const themeExtension = themeData [ name as keyof typeof themeData ] ;
78
79
return (
79
80
< Link key = { idx } to = { `/theme/data/${ linkName } ` } >
80
81
< ThemeCard >
81
82
< Title > { toTitleCase ( name ) } </ Title >
82
- < CodeEditor
83
- value = { codeString }
84
- height = "185px !important"
85
- theme = { themeData [ name as keyof typeof themeData ] }
86
- extensions = { [ color , langs . jsx ( ) ] }
87
- />
83
+ < CodeEditor >
84
+ < CodeMirror
85
+ theme = { themeExtension }
86
+ value = { codeString }
87
+ height = "185px !important"
88
+ extensions = { [ color , langs . jsx ( ) ] }
89
+ />
90
+ </ CodeEditor >
88
91
</ ThemeCard >
89
92
</ Link >
90
93
) ;
You can’t perform that action at this time.
0 commit comments