We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 071ce12 commit e504f8eCopy full SHA for e504f8e
browser/main/lib/ThemeManager.js
@@ -1,4 +1,5 @@
1
import ConfigManager from 'browser/main/lib/ConfigManager'
2
+import uiThemes from 'browser/lib/ui-themes'
3
4
const saveChanges = newConfig => {
5
ConfigManager.set(newConfig)
@@ -40,14 +41,7 @@ const chooseTheme = config => {
40
41
}
42
43
const applyTheme = theme => {
- const supportedThemes = [
44
- 'dark',
45
- 'white',
46
- 'solarized-dark',
47
- 'monokai',
48
- 'dracula'
49
- ]
50
- if (supportedThemes.indexOf(theme) !== -1) {
+ if (uiThemes.some(item => item.name === theme)) {
51
document.body.setAttribute('data-theme', theme)
52
if (document.body.querySelector('.MarkdownPreview')) {
53
document.body
0 commit comments