diff --git a/src/components/ThemeSettings/ThemesTab.tsx b/src/components/ThemeSettings/ThemesTab.tsx index 50ab15d0a..e9440e4fc 100644 --- a/src/components/ThemeSettings/ThemesTab.tsx +++ b/src/components/ThemeSettings/ThemesTab.tsx @@ -250,14 +250,12 @@ function ThemesTab() { switch (varInfo.type) { case "text": case "color": + case "checkbox": normalizedValue = varInfo.default; break; case "select": normalizedValue = varInfo.options.find(v => v.name === varInfo.default)!.value; break; - case "checkbox": - normalizedValue = varInfo.default ? "1" : "0"; - break; case "range": normalizedValue = `${varInfo.default}${varInfo.units}`; break; diff --git a/src/utils/themes/usercss/usercss-meta.d.ts b/src/utils/themes/usercss/usercss-meta.d.ts index f4d29e631..56bacd435 100644 --- a/src/utils/themes/usercss/usercss-meta.d.ts +++ b/src/utils/themes/usercss/usercss-meta.d.ts @@ -19,7 +19,7 @@ declare module "usercss-meta" { } | { type: "checkbox"; - default: boolean; + default: string; } | { type: "range";