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

Function switchToSingle

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

Source from the content-addressed store, hash-verified

117};
118
119export const switchToSingle = (
120 state: ThemeModeState,
121 osScheme: "dark" | "light",
122): SingleState => {
123 if (state.mode === "single") {
124 return state;
125 }
126 return {
127 mode: "single",
128 theme: osScheme === "dark" ? state.dark : state.light,
129 };
130};
131
132/**
133 * Flat request shape sent to the backend. Kept in sync with

Callers 2

themeMode.test.tsFile · 0.90
onChangeModeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected