add initial accessibility panel
This commit is contained in:
1 parent
605ff872e8
commit
85c0d8c4ab
15 files changed
+764
-56
No files matched your search
@@ -1,19 +1,18 @@
|
||||
import { theme, toggleTheme } from "@/store/theme"
|
||||
import { Button } from "@/ui/Button"
|
||||
import { HiOutlineEye, HiOutlineEyeOff } from "react-icons/hi"
|
||||
import { useTheme } from "@/ui/theme/useTheme"
|
||||
import { useSnapshot } from "valtio"
|
||||
|
||||
export function AccessibilityButton() {
|
||||
const { theme, setTheme } = useTheme()
|
||||
const t = useSnapshot(theme)
|
||||
|
||||
return (
|
||||
<Button
|
||||
theme="icon"
|
||||
size="default"
|
||||
onClick={() => {
|
||||
setTheme(theme === "default" ? "contrast" : "default")
|
||||
}}
|
||||
onClick={toggleTheme}
|
||||
>
|
||||
{theme === "default" ? (
|
||||
{t.theme === "default" ? (
|
||||
<HiOutlineEyeOff size={24} />
|
||||
) : (
|
||||
<HiOutlineEye size={24} />
|
||||
|
||||
Reference in new issue
Block a user