add global styling settings and refresh
This commit is contained in:
1 parent
ab9dfff33f
commit
41fa7ddf73
25 files changed
+2306
-269
No files matched your search
@@ -1,17 +1,7 @@
|
||||
import { createContext, useContext } from "react";
|
||||
|
||||
const ThemeContext = createContext(null);
|
||||
import { ThemeContext } from "./ThemeContextBase";
|
||||
|
||||
function ThemeProvider({ value, children }) {
|
||||
return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;
|
||||
}
|
||||
|
||||
function useTheme() {
|
||||
const context = useContext(ThemeContext);
|
||||
if (!context) {
|
||||
throw new Error("useTheme must be used within ThemeProvider.");
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
export { ThemeProvider, useTheme };
|
||||
export { ThemeProvider };
|
||||
Reference in new issue
Block a user