File tree 2 files changed +7
-5
lines changed
client/packages/lowcoder/src/comps/controls 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -863,15 +863,17 @@ export function styleControl<T extends readonly SingleColorConfig[]>(
863
863
const { comp, compType} = useContext ( CompContext ) ;
864
864
const theme = useContext ( ThemeContext ) ;
865
865
const bgColor = useContext ( BackgroundColorContext ) ;
866
+ const { themeId } = theme || { } ;
867
+ const isPreviewTheme = themeId === 'preview-theme' ;
868
+
866
869
867
870
const appSettingsComp = editorState ?. getAppSettingsComp ( ) ;
868
871
const preventAppStylesOverwriting = appSettingsComp ?. getView ( ) ?. preventAppStylesOverwriting ;
869
- const { themeId } = theme || { } ;
870
872
const { appliedThemeId, preventStyleOverwriting } = comp ?. comp ?. container || comp ?. comp || { } ;
871
- const appTheme = ! preventStyleOverwriting && ! preventAppStylesOverwriting
873
+ const appTheme = isPreviewTheme || ( ! preventStyleOverwriting && ! preventAppStylesOverwriting )
872
874
? theme ?. theme
873
875
: undefined ;
874
- const compTheme = compType && ! preventStyleOverwriting && ! preventAppStylesOverwriting
876
+ const compTheme = isPreviewTheme || ( compType && ! preventStyleOverwriting && ! preventAppStylesOverwriting )
875
877
? {
876
878
...( theme ?. theme ?. components ?. [ compType ] ?. [ styleKey ] || { } ) as unknown as Record < string , string >
877
879
}
Original file line number Diff line number Diff line change @@ -1459,8 +1459,8 @@ export const TableHeaderStyle = [
1459
1459
FONT_FAMILY ,
1460
1460
FONT_STYLE ,
1461
1461
TEXT ,
1462
- getStaticBackground ( SURFACE_COLOR ) ,
1463
- getBackground ( "primarySurface" ) ,
1462
+ // getStaticBackground(SURFACE_COLOR),
1463
+ // getBackground("primarySurface"),
1464
1464
{
1465
1465
name : "headerBackground" ,
1466
1466
label : trans ( "style.tableHeaderBackground" ) ,
You can’t perform that action at this time.
0 commit comments