refactor: editor-viewer using react-monaco-editor

This commit is contained in:
dongchengjie
2024-07-02 21:02:29 +08:00
parent 13618e6a0a
commit bf158b3bf0
8 changed files with 195 additions and 182 deletions

View File

@@ -124,12 +124,11 @@ export const ThemeViewer = forwardRef<DialogRef>((props, ref) => {
{t("Edit")} CSS
</Button>
<EditorViewer
title={`${t("Edit")} CSS`}
mode="text"
property={theme.css_injection ?? ""}
open={editorOpen}
title={`${t("Edit")} CSS`}
initialData={Promise.resolve(theme.css_injection ?? "")}
language="css"
onChange={(_prev, curr) => {
onSave={(_prev, curr) => {
theme.css_injection = curr;
handleChange("css_injection");
}}