diff --git a/src/App.vue b/src/App.vue index 1490dc3..a948d6a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -18,6 +18,7 @@ column: 1, language: "plaintext", languageAuto: true, + theme: "dark", } }, @@ -37,6 +38,7 @@ diff --git a/src/components/Editor.vue b/src/components/Editor.vue index fb36618..4965241 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -4,6 +4,9 @@ import initialData from "../editor/fixture.js" export default { + props: [ + "theme", + ], mounted() { this.$refs.editor.addEventListener("selectionChange", (e) => { //console.log("selectionChange:", e) @@ -18,6 +21,7 @@ element: this.$refs.editor, //content: "\n∞∞∞text\n", content: initialData, + theme: this.theme, }) }, } diff --git a/src/components/StatusBar.vue b/src/components/StatusBar.vue index 1bb45f6..d97d26c 100644 --- a/src/components/StatusBar.vue +++ b/src/components/StatusBar.vue @@ -18,6 +18,7 @@ "column", "language", "languageAuto", + "theme", ], mounted() { @@ -28,12 +29,16 @@ languageName() { return LANGUAGE_NAMES[this.language] || this.language }, + + className() { + return `status ${this.theme}` + }, }, }