added dark mode for icon

This commit is contained in:
saurabhg772244
2026-02-16 19:36:20 +05:30
parent 6160617458
commit f6cf766986
3 changed files with 19 additions and 3 deletions
+8 -1
View File
@@ -22,7 +22,8 @@
enabled: false
},
overviewRulerLanes: 0,
glyphMargin: true
glyphMargin: true,
lineNumbersMinChars: 4
} satisfies monaco.editor.IStandaloneEditorConstructionOptions;
let currentText = '';
let showPopup = $state(false);
@@ -184,6 +185,7 @@
const unsubscribeMode = mode.subscribe((mode) => {
if (editor) {
monaco.editor.setTheme(`mermaid${mode === 'dark' ? '-dark' : ''}`);
divElement?.classList.toggle('mermaid-dark', mode === 'dark');
}
});
const resizeObserver = new ResizeObserver((entries) => {
@@ -239,4 +241,9 @@
border-radius: 4px;
cursor: pointer;
}
:global(#editor.mermaid-dark .suggestion-icon) {
background-color: #2e4d6b;
background-image: url('/icons/use-chat-dark.svg');
}
</style>