updated codemirror theme
This commit is contained in:
parent
183ddde941
commit
168d4b035b
@ -1,7 +1,7 @@
|
|||||||
import { useRef, useEffect } from "react";
|
import { useRef, useEffect } from "react";
|
||||||
import { EditorState } from "@codemirror/state";
|
import { EditorState } from "@codemirror/state";
|
||||||
import { EditorView, keymap, lineNumbers } from "@codemirror/view";
|
import { EditorView, keymap, lineNumbers } from "@codemirror/view";
|
||||||
import { cobalt } from "thememirror";
|
import { espresso } from "thememirror";
|
||||||
import {
|
import {
|
||||||
defaultKeymap,
|
defaultKeymap,
|
||||||
history,
|
history,
|
||||||
@ -36,7 +36,7 @@ function CodeMirror({ code }: Props) {
|
|||||||
lineNumbers(),
|
lineNumbers(),
|
||||||
bracketMatching(),
|
bracketMatching(),
|
||||||
html(),
|
html(),
|
||||||
cobalt,
|
espresso,
|
||||||
EditorView.lineWrapping,
|
EditorView.lineWrapping,
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
@ -60,6 +60,6 @@ function CodeMirror({ code }: Props) {
|
|||||||
}
|
}
|
||||||
}, [code]);
|
}, [code]);
|
||||||
|
|
||||||
return <div className="overflow-x-scroll overflow-y-scroll mx-2" ref={ref} />;
|
return <div className="overflow-x-scroll overflow-y-scroll mx-2 border-[4px] border-black rounded-[20px]" ref={ref} />;
|
||||||
}
|
}
|
||||||
export default CodeMirror;
|
export default CodeMirror;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user