MCPcopy
hub / github.com/codeaashu/claude-code / useTheme

Function useTheme

src/components/design-system/ThemeProvider.tsx:122–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120 * accepts any ThemeSetting (including 'auto').
121 */
122export function useTheme() {
123 const $ = _c(3);
124 const {
125 currentTheme,
126 setThemeSetting
127 } = useContext(ThemeContext);
128 let t0;
129 if ($[0] !== currentTheme || $[1] !== setThemeSetting) {
130 t0 = [currentTheme, setThemeSetting];
131 $[0] = currentTheme;
132 $[1] = setThemeSetting;
133 $[2] = t0;
134 } else {
135 t0 = $[2];
136 }
137 return t0;
138}
139
140/**
141 * Returns the raw theme setting as stored in config. Use this in UI that

Callers 15

ThemedTextFunction · 0.70
ThemedBoxFunction · 0.70
MarkdownBodyFunction · 0.50
ValidationErrorsListFunction · 0.50
StructuredDiff.tsxFile · 0.50
MarkdownTableFunction · 0.50
TextInputFunction · 0.50
LogSelectorFunction · 0.50
ThemePickerFunction · 0.50
OnboardingFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected