Skip to content

Commit c4e1cb4

Browse files
authored
doc: Fix custom theme docs (#244)
The exports in `@codemirror/theme-one-dark` consist of two variables in an array, which makes up the extension: https://github.com/codemirror/theme-one-dark/blob/3f6f4e7ec22588df0e8c2777d8ce92889ce811b6/src/one-dark.ts#L134 Ref: #241
1 parent bf1a212 commit c4e1cb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default function App() {
167167
## Using custom theme
168168

169169
```jsx
170-
import { oneDarkTheme } from '@codemirror/theme-one-dark';
170+
import { oneDark } from '@codemirror/theme-one-dark';
171171
import CodeMirror from '@uiw/react-codemirror';
172172
import { javascript } from '@codemirror/lang-javascript';
173173

@@ -176,7 +176,7 @@ export default function App() {
176176
<CodeMirror
177177
value="console.log('hello world!');"
178178
height="100%"
179-
theme={oneDarkTheme}
179+
theme={oneDark}
180180
extensions={[javascript({ jsx: true })]}
181181
onChange={(value, viewUpdate) => {
182182
console.log('value:', value);

0 commit comments

Comments
 (0)