theme toggle

This commit is contained in:
Philipinho
2023-08-22 20:30:51 +01:00
parent f11f9f6210
commit 0fd7538a99
13 changed files with 503 additions and 4416 deletions
+12 -2
View File
@@ -1,6 +1,9 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import { cn } from "@/lib/utils";
import { ThemeProvider } from "@/components/providers/theme-provider";
import { Toaster } from "@/components/ui/toaster";
const inter = Inter({ subsets: ['latin'] })
@@ -14,9 +17,16 @@ export default function RootLayout({
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<html lang="en" suppressHydrationWarning>
<body className={cn("min-h-screen bg-background antialiased", inter.className)}>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
{children}
<Toaster />
</ThemeProvider>
</body>
</html>
)
}