add initial contrast theme
This commit is contained in:
1 parent
c4e13e8e1b
commit
3fa99b28de
15 files changed
+168
-20
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { useState } from "react"
|
||||
import { ThemeContext } from "./ThemeContext"
|
||||
import { ThemeType } from "./types"
|
||||
|
||||
export type ThemeProps = {
|
||||
children?: React.ReactNode
|
||||
}
|
||||
|
||||
export const Theme: React.FC<ThemeProps> = ({ children }) => {
|
||||
const [theme, setTheme] = useState<ThemeType>("default")
|
||||
|
||||
return (
|
||||
<ThemeContext.Provider value={[theme, setTheme]}>
|
||||
{children}
|
||||
</ThemeContext.Provider>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user