Skip to content

Commit c7c32f1

Browse files
authored
feat(query-devtools): Add Light mode support (#6146)
* feat(query-devtools): Add Light mode support * Update inactive query light mode styles
1 parent c5af17e commit c7c32f1

File tree

5 files changed

+633
-303
lines changed

5 files changed

+633
-303
lines changed

packages/query-devtools/src/Context.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createContext, useContext } from 'solid-js'
2+
import type { Accessor } from 'solid-js'
23
import type { Query, QueryClient, onlineManager } from '@tanstack/query-core'
34

45
type XPosition = 'left' | 'right'
@@ -39,3 +40,11 @@ export const QueryDevtoolsContext = createContext<QueryDevtoolsProps>({
3940
export function useQueryDevtoolsContext() {
4041
return useContext(QueryDevtoolsContext)
4142
}
43+
44+
export const ThemeContext = createContext<Accessor<'light' | 'dark'>>(
45+
() => 'dark' as const,
46+
)
47+
48+
export function useTheme() {
49+
return useContext(ThemeContext)
50+
}

0 commit comments

Comments
 (0)