MCPcopy Index your code
hub / github.com/coder/coder / resolveActiveThemeName

Function resolveActiveThemeName

site/src/theme/themeMode.ts:109–117  ·  view source on GitHub ↗
(
	state: ThemeModeState,
	osScheme: "dark" | "light",
)

Source from the content-addressed store, hash-verified

107};
108
109export const resolveActiveThemeName = (
110 state: ThemeModeState,
111 osScheme: "dark" | "light",
112): ConcreteThemeName => {
113 if (state.mode === "sync") {
114 return osScheme === "dark" ? state.dark : state.light;
115 }
116 return state.theme;
117};
118
119export const switchToSingle = (
120 state: ThemeModeState,

Callers 2

themeMode.test.tsFile · 0.90
ThemeProviderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected