- add common to themeinput

This commit is contained in:
Enrico Bühler 2021-11-11 23:03:42 +01:00
parent 24d5a8c508
commit 227c3176fe

View File

@ -4,6 +4,7 @@ import { generateShades, ColorsInput, ShadesOptions } from "./Colors";
export interface ThemeInput {
name: string;
colors: ColorsInput;
common?: any;
selector?: string;
}
@ -59,7 +60,7 @@ const generateTheme = (options: {
}
const themeRoot = generateThemeRoot({
properties: { ...themes[0].colors },
properties: { ...themes[0].colors, ...(themes[0].common || {}) },
});
if (themes.length > 1) {
@ -67,7 +68,7 @@ const generateTheme = (options: {
.slice(1)
.map((theme) => {
const overrideClass = generateThemeOverride({
properties: { ...theme.colors },
properties: { ...theme.colors, ...(theme.common || {}) },
selector: theme.selector ? theme.selector : "." + theme.name,
});