This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch template_less_preset_theme_editor
in repository https://gitbox.apache.org/repos/asf/superset.git

commit a2c8621826ce35c294fd3cad490e969421de3970
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Tue Apr 1 00:42:43 2025 -0700

    all working
---
 superset-frontend/src/components/ThemeEditor/index.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/superset-frontend/src/components/ThemeEditor/index.tsx 
b/superset-frontend/src/components/ThemeEditor/index.tsx
index 85708ab41f..f1337b1fb8 100644
--- a/superset-frontend/src/components/ThemeEditor/index.tsx
+++ b/superset-frontend/src/components/ThemeEditor/index.tsx
@@ -97,7 +97,7 @@ export default function ThemeEditor() {
   };
 
   const updateColorBgBase = dark => {
-    setToken('colorBgBase', dark ? '#141414' : '#ffffff');
+    setToken('colorBgBase', dark ? '#000' : '#fff');
   };
 
   const getMergedTheme = () => {
@@ -105,21 +105,22 @@ export default function ThemeEditor() {
     try {
       overrides = JSON.parse(jsonOverrides);
     } catch (e) {
-      console.log('Invalid JSON in overrides:', e);
+      console.error('Invalid JSON in overrides:', e);
     }
     const algorithm = [
       isDark ? 'dark' : 'default',
       ...(isCompact ? ['compact'] : []),
     ];
     return {
-      tokens: { ...tokens, ...overrides },
+      token: { ...tokens, ...overrides },
       algorithm,
     };
   };
 
   const applyTheme = () => {
     try {
-      themeObject.setConfig(getMergedTheme());
+      const antdTheme = getMergedTheme();
+      themeObject.setConfig(antdTheme);
     } catch (e) {
       console.error('Failed to apply theme overrides:', e);
     }
@@ -254,7 +255,6 @@ function ThemeToken({ token, type, tokens, setToken }) {
             {...commonProps}
             value={value}
             onChange={(_, hex) => handleChange(hex)}
-            format="hex"
           />
         );
       case 'number':

Reply via email to