File tree Expand file tree Collapse file tree 2 files changed +21
-19
lines changed
Expand file tree Collapse file tree 2 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
1717 Select ,
1818 ActiveQueryPanel ,
1919} from './styledComponents'
20- import { ThemeProvider } from './theme'
20+ import { ThemeProvider , defaultTheme as theme } from './theme'
2121import { getQueryStatusLabel , getQueryStatusColor } from './utils'
2222import Explorer from './Explorer'
2323import Logo from './Logo'
@@ -74,20 +74,6 @@ interface DevtoolsPanelOptions {
7474
7575const isServer = typeof window === 'undefined'
7676
77- const theme = {
78- background : '#0b1521' ,
79- backgroundAlt : '#132337' ,
80- foreground : 'white' ,
81- gray : '#3f4e60' ,
82- grayAlt : '#222e3e' ,
83- inputBackgroundColor : '#fff' ,
84- inputTextColor : '#000' ,
85- success : '#00ab52' ,
86- danger : '#ff0085' ,
87- active : '#006bff' ,
88- warning : '#ffb200' ,
89- }
90-
9177export function ReactQueryDevtools ( {
9278 initialIsOpen,
9379 panelProps = { } ,
Original file line number Diff line number Diff line change 1- // @ts -nocheck
2-
31import React from 'react'
42
5- const ThemeContext = React . createContext ( )
3+ export const defaultTheme = {
4+ background : '#0b1521' ,
5+ backgroundAlt : '#132337' ,
6+ foreground : 'white' ,
7+ gray : '#3f4e60' ,
8+ grayAlt : '#222e3e' ,
9+ inputBackgroundColor : '#fff' ,
10+ inputTextColor : '#000' ,
11+ success : '#00ab52' ,
12+ danger : '#ff0085' ,
13+ active : '#006bff' ,
14+ warning : '#ffb200' ,
15+ }
16+
17+ interface ProviderProps {
18+ theme : typeof defaultTheme
19+ }
20+
21+ const ThemeContext = React . createContext ( defaultTheme )
622
7- export function ThemeProvider ( { theme, ...rest } ) {
23+ export function ThemeProvider ( { theme, ...rest } : ProviderProps ) {
824 return < ThemeContext . Provider value = { theme } { ...rest } />
925}
1026
You can’t perform that action at this time.
0 commit comments