File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
client/packages/lowcoder/src/comps/controls Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -865,17 +865,21 @@ export function styleControl<T extends readonly SingleColorConfig[]>(
865865 const bgColor = useContext ( BackgroundColorContext ) ;
866866 const { themeId } = theme || { } ;
867867 const isPreviewTheme = themeId === 'preview-theme' ;
868+ const isDefaultTheme = themeId === 'default-theme-id' ;
868869
869870
870871 const appSettingsComp = editorState ?. getAppSettingsComp ( ) ;
871872 const preventAppStylesOverwriting = appSettingsComp ?. getView ( ) ?. preventAppStylesOverwriting ;
872873 const { appliedThemeId, preventStyleOverwriting } = comp ?. comp ?. container || comp ?. comp || { } ;
873- const appTheme = isPreviewTheme || ( ! preventStyleOverwriting && ! preventAppStylesOverwriting )
874+ const appTheme = isPreviewTheme || isDefaultTheme || ( ! preventStyleOverwriting && ! preventAppStylesOverwriting )
874875 ? theme ?. theme
875876 : undefined ;
876- const compTheme = isPreviewTheme || ( compType && ! preventStyleOverwriting && ! preventAppStylesOverwriting )
877+ const compTheme = isPreviewTheme || isDefaultTheme || ( compType && ! preventStyleOverwriting && ! preventAppStylesOverwriting )
877878 ? {
878- ...( theme ?. theme ?. components ?. [ compType ] ?. [ styleKey ] || { } ) as unknown as Record < string , string >
879+ ...(
880+ theme ?. theme ?. components ?. [ compType ] ?. [ styleKey ]
881+ || defaultTheme . components ?. [ compType ] ?. [ styleKey ]
882+ ) as unknown as Record < string , string >
879883 }
880884 : undefined ;
881885 const styleProps = ( ! comp && ! compType ) || preventStyleOverwriting || preventAppStylesOverwriting || appliedThemeId === themeId
You can’t perform that action at this time.
0 commit comments