MCPcopy Create free account
hub / github.com/continuedev/continue / varWithFallback

Function varWithFallback

gui/src/styles/theme.ts:218–224  ·  view source on GitHub ↗
(colorName: keyof typeof THEME_COLORS)

Source from the content-addressed store, hash-verified

216};
217
218export const varWithFallback = (colorName: keyof typeof THEME_COLORS) => {
219 const themeVals = THEME_COLORS[colorName];
220 if (!themeVals) {
221 throw new Error(`Invalid theme color name ${colorName}`);
222 }
223 return getRecursiveVar(themeVals.vars, themeVals.default);
224};
225
226export const setDocumentStylesFromTheme = (
227 theme: Record<string, string | undefined | null>,

Callers 7

index.tsFile · 0.90
DeprecationBannerFunction · 0.90
TabBar.tsxFile · 0.90
Tooltip.tsxFile · 0.90
AlertFunction · 0.90

Calls 1

getRecursiveVarFunction · 0.85

Tested by

no test coverage detected