(props: {
children: JSX.Element
theme: TanStackDevtoolsTheme
})
| 15 | setTheme: (theme: TanStackDevtoolsTheme) => void |
| 16 | } |
| 17 | const ThemeContext = createContext<ThemeContextValue>() |
| 18 | |
| 19 | export const ThemeContextProvider = (props: { |
| 20 | children: JSX.Element |
| 21 | theme: TanStackDevtoolsTheme |
| 22 | }) => { |
| 23 | // Follows `props.theme`, and `setTheme` overrides it until the prop changes. |
| 24 | const [theme, setTheme] = createSignal<TanStackDevtoolsTheme>( |
| 25 | () => props.theme, |
| 26 | ) |
| 27 | let container: HTMLSpanElement | undefined |
| 28 | onSettled(() => { |
| 29 | if (container) ensureDevtoolsStyles(container.ownerDocument) |
| 30 | }) |
| 31 | return ( |
| 32 | <ThemeContext value={{ theme, setTheme }}> |
| 33 | <span ref={container} style={{ display: 'contents' }}> |
nothing calls this directly
no outgoing calls
no test coverage detected