Skip to content

Commit

Permalink
fix(UI): fix theme switch status
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhosny committed Feb 3, 2024
1 parent b1a0eea commit ce0fe2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/livecodes/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,7 @@ const setTheme = (theme: Theme, editorTheme: Config['editorTheme']) => {
const root = document.querySelector(':root');
root?.classList.remove(...themes);
root?.classList.add(theme);
UI.getThemeToggle().checked = theme === 'dark';
getAllEditors().forEach((editor) => {
editor?.setTheme(theme, editorTheme);
customEditors[editor?.getLanguage()]?.setTheme(theme);
Expand Down

0 comments on commit ce0fe2c

Please sign in to comment.