feat: login form as a client component, theme toggle

This commit is contained in:
2025-07-17 16:49:46 +04:00
parent 0de352c323
commit 39b4d36a82
44 changed files with 14445 additions and 1 deletions

View File

@ -0,0 +1,40 @@
"use client";
import { IconMoon, IconSun } from "@tabler/icons-react";
import classNames from "classnames";
import {
ActionIcon,
useComputedColorScheme,
useMantineColorScheme,
} from "@mantine/core";
import style from "./ActionToggle.module.css";
export function ColorSchemeToggle() {
const { setColorScheme } = useMantineColorScheme();
const computedColorScheme = useComputedColorScheme("light", {
getInitialValueInEffect: true,
});
return (
<ActionIcon
onClick={() =>
setColorScheme(
computedColorScheme === "light" ? "dark" : "light"
)
}
variant="default"
size="xl"
radius="md"
aria-label="Toggle color scheme"
className={style.container}>
<IconSun
className={classNames(style.icon, style.light)}
stroke={1.5}
/>
<IconMoon
className={classNames(style.icon, style.dark)}
stroke={1.5}
/>
</ActionIcon>
);
}