duplicate blind button in header
This commit is contained in:
1 parent
343a364d9b
commit
6449845fd6
3 files changed
+30
-12
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { Button } from "@/ui/Button"
|
||||
import { HiOutlineEye, HiOutlineEyeOff } from "react-icons/hi"
|
||||
import { useTheme } from "@/ui/theme/useTheme"
|
||||
|
||||
export function AccessibilityButton() {
|
||||
const { theme, setTheme } = useTheme()
|
||||
|
||||
return (
|
||||
<Button
|
||||
theme="icon"
|
||||
size="default"
|
||||
onClick={() => {
|
||||
setTheme(theme === "default" ? "contrast" : "default")
|
||||
}}
|
||||
>
|
||||
{theme === "default" ? (
|
||||
<HiOutlineEyeOff size={24} />
|
||||
) : (
|
||||
<HiOutlineEye size={24} />
|
||||
)}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
@@ -9,8 +9,7 @@ import { useRouter } from "next/router"
|
||||
import { useMobile } from "src/hooks/useMobile"
|
||||
import { Navigation } from "@/components/Navigation"
|
||||
import { Box } from "@/ui/Box"
|
||||
import { Button } from "@/ui/Button"
|
||||
import { HiOutlineEye, HiOutlineEyeOff } from "react-icons/hi"
|
||||
import { AccessibilityButton } from "../AccessibilityButton"
|
||||
import { useTheme } from "@/ui/theme/useTheme"
|
||||
import { Copyright } from "../Copyright"
|
||||
import { Spacer } from "../Spacer"
|
||||
@@ -19,7 +18,6 @@ import { Title } from "@/ui/Title"
|
||||
import { Panel } from "@/ui/Panel"
|
||||
import { Contacts } from "../Contacts"
|
||||
import dynamic from "next/dynamic"
|
||||
import { mk } from "date-fns/locale"
|
||||
|
||||
import qr0 from "src/assets/qr00.png"
|
||||
import qr1 from "src/assets/qr01.png"
|
||||
@@ -83,15 +81,7 @@ export const App: React.FC<AppProps> = ({ showAuthor = false, menu, ...props })
|
||||
<Title level={3}>
|
||||
Версия для слабовидящих
|
||||
</Title>
|
||||
<Button theme="icon" size="default" onClick={() => {
|
||||
setTheme(theme === "default" ? "contrast" : "default")
|
||||
}}>
|
||||
{theme === "default" ? (
|
||||
<HiOutlineEyeOff size={24} />
|
||||
) : (
|
||||
<HiOutlineEye size={24} />
|
||||
)}
|
||||
</Button>
|
||||
<AccessibilityButton />
|
||||
</Panel>
|
||||
|
||||
<Panel ghost style={{
|
||||
|
||||
@@ -5,6 +5,8 @@ import { Box } from "@/ui/Box"
|
||||
import { HudozkaLogo } from "../HudozkaLogo"
|
||||
import { useDarkTheme } from "@/hooks/useDarkTheme"
|
||||
import Link from "next/link"
|
||||
import { AccessibilityButton } from "../AccessibilityButton"
|
||||
import { Spacer } from "../Spacer"
|
||||
|
||||
export type DesktopNavigationProps = {
|
||||
style?: React.CSSProperties
|
||||
@@ -23,6 +25,9 @@ export const DesktopNavigation: React.FC<DesktopNavigationProps> = ({ style }) =
|
||||
<Menu
|
||||
items={menu}
|
||||
/>
|
||||
|
||||
<Spacer />
|
||||
<AccessibilityButton />
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user