fix return types
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m25s

This commit is contained in:
Lee
2024-04-18 03:51:41 +01:00
parent 3c9709df12
commit ac1d9b4f82
20 changed files with 41 additions and 91 deletions

View File

@ -1,10 +1,10 @@
"use client";
import { MoonIcon, SunIcon } from "@heroicons/react/16/solid";
import { useTheme } from "next-themes";
import { MoonIcon } from "./icon/moon-icon";
import { SunIcon } from "./icon/sun-icon";
import { ReactElement } from "react";
export function ToggleThemeButton(): JSX.Element {
export function ToggleThemeButton(): ReactElement {
const { theme, setTheme } = useTheme();
return (
@ -13,7 +13,7 @@ export function ToggleThemeButton(): JSX.Element {
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
aria-label="Toggle Theme"
>
{theme === "dark" ? <SunIcon /> : <MoonIcon color="#000" />}
{theme === "dark" ? <SunIcon width={24} height={24} /> : <MoonIcon width={24} height={24} color="#000" />}
</button>
);
}