@@ -25,7 +25,7 @@ export const generateThemeVariant = (theme: IPartialTheme | ITheme, themeType: V
25
25
26
26
export const getDefaultTheme = ( ) : ITheme => {
27
27
let currentTheme ;
28
- const themeColorsFromWindow : any = ( window as any ) ?. __themeState__ ?. theme ;
28
+ const themeColorsFromWindow : any = ( window as any ) ?. __themeState__ ?. theme ; // eslint-disable-line @typescript-eslint/no-explicit-any
29
29
if ( themeColorsFromWindow ) {
30
30
currentTheme = createTheme ( {
31
31
palette : themeColorsFromWindow
@@ -40,11 +40,11 @@ export const getDefaultTheme = (): ITheme => {
40
40
export const generateThemeFromColors = ( primaryColor : string , textColor : string , backgroundColor : string ) : ITheme => {
41
41
const themeRules = themeRulesStandardCreator ( ) ;
42
42
const colors = {
43
- primaryColor : getColorFromString ( primaryColor ) ! ,
44
- textColor : getColorFromString ( textColor ) ! ,
45
- backgroundColor : getColorFromString ( backgroundColor ) ! ,
43
+ primaryColor : getColorFromString ( primaryColor ) ,
44
+ textColor : getColorFromString ( textColor ) ,
45
+ backgroundColor : getColorFromString ( backgroundColor ) ,
46
46
} ;
47
- const currentIsDark = isDark ( themeRules [ BaseSlots [ BaseSlots . backgroundColor ] ] . color ! ) ;
47
+ const currentIsDark = isDark ( themeRules [ BaseSlots [ BaseSlots . backgroundColor ] ] . color ) ;
48
48
49
49
ThemeGenerator . insureSlots ( themeRules , currentIsDark ) ;
50
50
ThemeGenerator . setSlot (
@@ -76,4 +76,4 @@ export const generateThemeFromColors = (primaryColor: string, textColor: string,
76
76
} ) ;
77
77
78
78
return generatedTheme ;
79
- } ;
79
+ } ;
0 commit comments