({ theme, children }: ThemeProviderProps)
| 43 | } |
| 44 | |
| 45 | export const ThemeUIProvider = ({ theme, children }: ThemeProviderProps) => { |
| 46 | const outer = useThemeUI() |
| 47 | |
| 48 | const isTopLevel = outer === __themeUiDefaultContextValue |
| 49 | |
| 50 | return ( |
| 51 | <CoreProvider theme={theme}> |
| 52 | <ColorModeProvider> |
| 53 | {isTopLevel && <RootStyles />} |
| 54 | {children} |
| 55 | </ColorModeProvider> |
| 56 | </CoreProvider> |
| 57 | ) |
| 58 | } |
| 59 | |
| 60 | /** @deprecated ThemeProvider is now called ThemeUIProvider to reduce confusion with Emotion */ |
| 61 | export const ThemeProvider: React.FC<ThemeProviderProps> = ({ |
nothing calls this directly
no test coverage detected
searching dependent graphs…