mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 21:39:40 +02:00
#1542 Theme variables setup
This commit is contained in:
@@ -55,7 +55,8 @@ import getStyles from './styles';
|
||||
const themes = {};
|
||||
|
||||
for (const themeName of ['default', 'forest', 'dark', 'neutral']) {
|
||||
themes[themeName] = require(`./theme-${themeName}.js`).default;
|
||||
themes[themeName] = require(`./theme-${themeName}.js`);
|
||||
console.warn(themeName, themes[themeName]);
|
||||
}
|
||||
|
||||
function parse(text) {
|
||||
@@ -540,6 +541,7 @@ function initialize(options) {
|
||||
// Set default options
|
||||
|
||||
if (options.theme && themes[options.theme]) {
|
||||
// Todo merge with user options
|
||||
options.themeVariables = themes[options.theme];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user