theme: remove font scale from config

This commit is contained in:
Abdullah Atta
2022-08-30 16:53:46 +05:00
parent be21c4735f
commit 79f8b5e95e
3 changed files with 8 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ const SANS_FONT_STACK = [
"Helvetica",
"-apple-system",
"BlinkMacSystemFont",
"sans-serif",
"sans-serif"
];
const MONOSPACE_FONT_STACK = [
"Hack",
@@ -39,7 +39,7 @@ const MONOSPACE_FONT_STACK = [
'"Liberation Mono"',
'"Courier New"',
"Courier",
"monospace",
"monospace"
];
export type FontConfig = {
@@ -52,19 +52,19 @@ export type FontConfig = {
};
fonts: { body: string; monospace: string; heading: string };
};
export function getFontConfig(scale?: number): FontConfig {
export function getFontConfig(): FontConfig {
return {
fontSizes: getFontSizes(scale),
fontSizes: getFontSizes(),
fontWeights: {
normal: 400,
body: 400,
heading: 600,
bold: 600,
bold: 600
},
fonts: {
body: SANS_FONT_STACK.join(","),
monospace: MONOSPACE_FONT_STACK.join(","),
heading: SANS_FONT_STACK.join(","),
},
heading: SANS_FONT_STACK.join(",")
}
};
}

View File

@@ -64,7 +64,7 @@ class ThemeFactory {
: {
menu: "0px 0px 10px 0px #00000022"
},
...getFontConfig(config.scale),
...getFontConfig(),
...variants
};
theme.space.small = 3;

View File

@@ -21,5 +21,4 @@ import { ColorSchemes } from "./colorscheme";
export type ThemeConfig = {
theme: ColorSchemes;
accent: string;
scale?: number;
};