mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-10 00:20:06 +08:00
Darkmode for survey pages. Fixes for eslint.
This commit is contained in:
@@ -26,11 +26,11 @@ Default.args = {
|
||||
session: {
|
||||
data: {
|
||||
user: {
|
||||
name: "StoryBook user"
|
||||
}
|
||||
name: "StoryBook user",
|
||||
},
|
||||
},
|
||||
status: "authenticated"
|
||||
status: "authenticated",
|
||||
},
|
||||
transparent: false,
|
||||
borderClass: undefined
|
||||
borderClass: undefined,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Button, Box } from "@chakra-ui/react";
|
||||
import { Popover } from "@headlessui/react";
|
||||
import clsx from "clsx";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
@@ -115,7 +114,7 @@ export function Header(props) {
|
||||
</Popover>
|
||||
<AccountButton />
|
||||
<UserMenu />
|
||||
<ColorModeIconToggle className="ml-5"/>
|
||||
<ColorModeIconToggle className="ml-5" />
|
||||
</div>
|
||||
</Box>
|
||||
</nav>
|
||||
|
||||
@@ -4,19 +4,13 @@ import { useState } from "react";
|
||||
|
||||
import { useColorMode } from "@chakra-ui/react";
|
||||
|
||||
|
||||
export function NavLinks(): JSX.Element {
|
||||
const [hoveredIndex, setHoveredIndex] = useState(null);
|
||||
const { colorMode } = useColorMode();
|
||||
|
||||
const linkColor = colorMode === "light" ? "text-gray-700 hover:text-gray-900" : "text-gray-50 hover:text-white";
|
||||
|
||||
const linkColor = (colorMode === "light") ?
|
||||
"text-gray-700 hover:text-gray-900" :
|
||||
"text-gray-50 hover:text-white";
|
||||
|
||||
const hoverBgColor = (colorMode === "light") ?
|
||||
"bg-gray-100" :
|
||||
"bg-gray-800";
|
||||
const hoverBgColor = colorMode === "light" ? "bg-gray-100" : "bg-gray-800";
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user