- add common to themeinput
This commit is contained in:
parent
24d5a8c508
commit
227c3176fe
@ -4,6 +4,7 @@ import { generateShades, ColorsInput, ShadesOptions } from "./Colors";
|
|||||||
export interface ThemeInput {
|
export interface ThemeInput {
|
||||||
name: string;
|
name: string;
|
||||||
colors: ColorsInput;
|
colors: ColorsInput;
|
||||||
|
common?: any;
|
||||||
selector?: string;
|
selector?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ const generateTheme = (options: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const themeRoot = generateThemeRoot({
|
const themeRoot = generateThemeRoot({
|
||||||
properties: { ...themes[0].colors },
|
properties: { ...themes[0].colors, ...(themes[0].common || {}) },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (themes.length > 1) {
|
if (themes.length > 1) {
|
||||||
@ -67,7 +68,7 @@ const generateTheme = (options: {
|
|||||||
.slice(1)
|
.slice(1)
|
||||||
.map((theme) => {
|
.map((theme) => {
|
||||||
const overrideClass = generateThemeOverride({
|
const overrideClass = generateThemeOverride({
|
||||||
properties: { ...theme.colors },
|
properties: { ...theme.colors, ...(theme.common || {}) },
|
||||||
selector: theme.selector ? theme.selector : "." + theme.name,
|
selector: theme.selector ? theme.selector : "." + theme.name,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user