feat: implement dark mode

This commit is contained in:
Jean-Philippe Sirois
2019-09-14 15:47:10 -04:00
parent a9e74c108f
commit 5f76447e05
18 changed files with 266 additions and 98 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useContext } from "react"
import { IThemeContext, ThemeContext } from "../ThemeProvider"
export default function useTheme(): IThemeContext {
const themeContext = useContext(ThemeContext)
if (!themeContext) {
throw Error("Need context")
}
return themeContext
}