Darkmode for survey pages. Fixes for eslint.

This commit is contained in:
Desmond Grealy
2023-01-02 18:36:54 -08:00
parent 5f3d32b875
commit 3d13c7c91c
35 changed files with 4778 additions and 330 deletions
@@ -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 -2
View File
@@ -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>
+2 -8
View File
@@ -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 (
<>