MCPcopy Create free account
hub / github.com/adobe/react-spectrum / RACSettingsProvider

Function RACSettingsProvider

packages/dev/s2-docs/src/SettingsProvider.tsx:80–93  ·  view source on GitHub ↗
({children}: Pick<SettingsProviderProps, 'children'>)

Source from the content-addressed store, hash-verified

78}
79
80export function RACSettingsProvider({children}: Pick<SettingsProviderProps, 'children'>) {
81 let {colorScheme, toggleColorScheme, systemColorScheme} = useSettingsState();
82
83 return (
84 <SettingsContext.Provider
85 value={{
86 colorScheme,
87 toggleColorScheme,
88 systemColorScheme
89 }}>
90 {children}
91 </SettingsContext.Provider>
92 );
93}
94
95export function SettingsProvider({children}: SettingsProviderProps) {
96 let {colorScheme, toggleColorScheme, systemColorScheme, providerColorScheme} = useSettingsState();

Callers

nothing calls this directly

Calls 1

useSettingsStateFunction · 0.85

Tested by

no test coverage detected