Sticky (fixed) dark mode switch, solid moon icon

This commit is contained in:
Xevion
2022-12-18 02:54:20 -06:00
parent a638b15089
commit d0984345f6
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import React, {FunctionComponent, useEffect, useState} from "react";
import {MoonIcon, SunIcon} from "@heroicons/react/24/outline";
import {SunIcon} from "@heroicons/react/24/outline";
import {MoonIcon} from "@heroicons/react/24/solid";
import {classNames} from "@/utils/helpers";
function setMode(dark: boolean) {

View File

@@ -11,7 +11,7 @@ const Page: FunctionComponent<PageProps> = ({children}: PageProps) => {
return (
<>
<main className="flex w-full flex-col items-center bg-white dark:bg-zinc-900 text-gray-700 dark:text-gray-300">
<DarkModeSwitch className="absolute top-5 right-5" />
<DarkModeSwitch className="fixed top-5 right-5" />
<div className="mt-8 px-3 max-w-screen-md w-[90%]">
<h1 className="text-3xl font-rokkitt text-zinc-800 dark:text-zinc-100 sm:text-5xl mb-2">
<Link href={"/"}>100Prisoners.com</Link>