File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
client/packages/lowcoder/src/comps/controls Expand file tree Collapse file tree 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[]>(
863863 const { comp, compType} = useContext ( CompContext ) ;
864864 const theme = useContext ( ThemeContext ) ;
865865 const bgColor = useContext ( BackgroundColorContext ) ;
866+ const { themeId } = theme || { } ;
867+ const isPreviewTheme = themeId === 'preview-theme' ;
868+
866869
867870 const appSettingsComp = editorState ?. getAppSettingsComp ( ) ;
868871 const preventAppStylesOverwriting = appSettingsComp ?. getView ( ) ?. preventAppStylesOverwriting ;
869- const { themeId } = theme || { } ;
870872 const { appliedThemeId, preventStyleOverwriting } = comp ?. comp ?. container || comp ?. comp || { } ;
871- const appTheme = ! preventStyleOverwriting && ! preventAppStylesOverwriting
873+ const appTheme = isPreviewTheme || ( ! preventStyleOverwriting && ! preventAppStylesOverwriting )
872874 ? theme ?. theme
873875 : undefined ;
874- const compTheme = compType && ! preventStyleOverwriting && ! preventAppStylesOverwriting
876+ const compTheme = isPreviewTheme || ( compType && ! preventStyleOverwriting && ! preventAppStylesOverwriting )
875877 ? {
876878 ...( theme ?. theme ?. components ?. [ compType ] ?. [ styleKey ] || { } ) as unknown as Record < string , string >
877879 }
Original file line number Diff line number Diff line change @@ -1459,8 +1459,8 @@ export const TableHeaderStyle = [
14591459 FONT_FAMILY ,
14601460 FONT_STYLE ,
14611461 TEXT ,
1462- getStaticBackground ( SURFACE_COLOR ) ,
1463- getBackground ( "primarySurface" ) ,
1462+ // getStaticBackground(SURFACE_COLOR),
1463+ // getBackground("primarySurface"),
14641464 {
14651465 name : "headerBackground" ,
14661466 label : trans ( "style.tableHeaderBackground" ) ,
You can’t perform that action at this time.
0 commit comments