({ children }: ThemeProviderProps)
| 59 | }; |
| 60 | |
| 61 | export function ThemeProvider({ children }: ThemeProviderProps) { |
| 62 | const [currentTheme, setCurrentTheme] = useState<Theme>(getInitialTheme); |
| 63 | |
| 64 | const setTheme = useCallback((theme: Theme) => { |
| 65 | setCurrentTheme(theme); |
| 66 | persistTheme(theme); |
| 67 | }, []); |
| 68 | |
| 69 | return ( |
| 70 | <ThemeContext.Provider |
| 71 | value={{ colors: currentTheme.colors, currentTheme, setTheme }}> |
| 72 | {children} |
| 73 | </ThemeContext.Provider> |
| 74 | ); |
| 75 | }; |
nothing calls this directly
no test coverage detected