MCPcopy Create free account
hub / github.com/primer/react / useTheme

Function useTheme

packages/react/src/ThemeProvider.tsx:149–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147}
148
149export function useTheme() {
150 return React.useContext(ThemeContext)
151}
152
153export function useColorSchemeVar(values: Partial<Record<string, string>>, fallback: string) {
154 const {colorScheme = ''} = useTheme()

Callers 15

BaseStylesFunction · 0.90
RootFunction · 0.90
Overlay.tsxFile · 0.90
useConfirmFunction · 0.90
LabelGroupFunction · 0.90
Item.tsxFile · 0.90
ButtonBase.tsxFile · 0.90
UnderlineNav.tsxFile · 0.90
Item.tsxFile · 0.90
ActiveDescendantFunction · 0.90

Calls

no outgoing calls

Tested by 4

ToggleModeFunction · 0.68
ToggleDaySchemeFunction · 0.68
ToggleNightSchemeFunction · 0.68
ComponentFunction · 0.68