Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/theme.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import themes from "./themes";

export default class Theme {
constructor(themeName) {
constructor(theme) {

var theme = themes[themeName];
if(theme === undefined) {
if(typeof theme == "string")
{
theme = themes[themeName];
if(!theme){

console.error(`There is no theme preset with the name '${themeName}'! Defaulting to dark theme.`);
theme = themes.dark;
}
}

// Merge the base theme with the theme parameters and make
Expand Down