Skip to content

Commit 59854a6

Browse files
committed
Fix
1 parent 922bac2 commit 59854a6

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed

site/src/pages/UserSettingsPage/AppearancePage/AppearanceForm.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ import { PreviewBadge } from "components/Badges/Badges";
1515
import { Stack } from "components/Stack/Stack";
1616
import { ThemeOverride } from "contexts/ThemeProvider";
1717
import type { FC } from "react";
18-
import themes, {
19-
DEFAULT_TERMINAL_FONT,
20-
DEFAULT_THEME,
21-
fontLabels,
22-
type Theme,
23-
} from "theme";
18+
import themes, { DEFAULT_THEME, type Theme } from "theme";
19+
import { DEFAULT_TERMINAL_FONT, terminalFontLabels } from "theme/constants";
2420
import { Section } from "../Section";
2521

2622
export interface AppearanceFormProps {
@@ -119,8 +115,8 @@ export const AppearanceForm: FC<AppearanceFormProps> = ({
119115
value={name}
120116
control={<Radio />}
121117
label={
122-
<div css={{ fontFamily: fontLabels[name] }}>
123-
{fontLabels[name]}
118+
<div css={{ fontFamily: terminalFontLabels[name] }}>
119+
{terminalFontLabels[name]}
124120
</div>
125121
}
126122
/>

site/src/theme/constants.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,21 @@ import type { TerminalFontName } from "api/typesGenerated";
33
export const borderRadius = 8;
44
export const MONOSPACE_FONT_FAMILY =
55
"'IBM Plex Mono', 'Lucida Console', 'Lucida Sans Typewriter', 'Liberation Mono', 'Monaco', 'Courier New', Courier, monospace";
6+
export const BODY_FONT_FAMILY = `"Inter Variable", system-ui, sans-serif`;
7+
68
export const terminalFonts: Record<TerminalFontName, string> = {
79
"fira-code": MONOSPACE_FONT_FAMILY.replace("IBM Plex Mono", "Fira Code"),
810
"ibm-plex-mono": MONOSPACE_FONT_FAMILY,
911

1012
"": MONOSPACE_FONT_FAMILY,
1113
};
14+
export const terminalFontLabels: Record<TerminalFontName, string> = {
15+
"fira-code": "Fira Code",
16+
"ibm-plex-mono": "IBM Plex Mono",
17+
"": "", // needed for enum completeness, otherwise fails the build
18+
};
19+
export const DEFAULT_TERMINAL_FONT = "ibm-plex-mono";
1220

13-
export const BODY_FONT_FAMILY = `"Inter Variable", system-ui, sans-serif`;
1421
export const navHeight = 62;
1522
export const containerWidth = 1380;
1623
export const containerWidthMedium = 1080;

site/src/theme/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
import type { Theme as MuiTheme } from "@mui/material/styles";
33
import type { TerminalFontName } from "api/typesGenerated";
44
import type * as monaco from "monaco-editor";
5-
import { of } from "rxjs";
65
import type { Branding } from "./branding";
7-
import { terminalFonts } from "./constants";
86
import dark from "./dark";
97
import type { NewTheme } from "./experimental";
108
import type { ExternalImageModeStyles } from "./externalImages";
@@ -39,11 +37,3 @@ const theme = {
3937
} satisfies Record<string, Theme>;
4038

4139
export default theme;
42-
43-
export const fontLabels: Record<TerminalFontName, string> = {
44-
"fira-code": "Fira Code",
45-
"ibm-plex-mono": "IBM Plex Mono",
46-
"": "", // needed for enum completeness, otherwise fails the build
47-
};
48-
49-
export const DEFAULT_TERMINAL_FONT = "ibm-plex-mono";

0 commit comments

Comments
 (0)