sass, global vars, components

This commit is contained in:
Max Peintner
2023-04-24 15:32:57 +02:00
parent e323e48523
commit fd11a78bc2
15 changed files with 309 additions and 90 deletions

View File

@@ -1,6 +1,8 @@
"use client";
import { ColorService } from "#/utils/colors";
import { ThemeProvider, useTheme } from "next-themes";
import { useEffect } from "react";
type Props = {
children: React.ReactNode;
@@ -10,7 +12,10 @@ export function LayoutProviders({ children }: Props) {
const { resolvedTheme } = useTheme();
const isDark = resolvedTheme && resolvedTheme === "dark";
console.log(isDark);
useEffect(() => {
new ColorService(document);
});
return (
<ThemeProvider
attribute="class"