Comprehensive admin + user dashboards (production-ready)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
import { ThemeProvider as NextThemesProvider, type ThemeProviderProps } from "next-themes";
|
||||
|
||||
/**
|
||||
* App-wide theme provider. Wraps next-themes with class-based dark mode so the
|
||||
* `.dark` token overrides in globals.css apply. `disableTransitionOnChange`
|
||||
* prevents a flash of color transitions when toggling.
|
||||
*/
|
||||
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
||||
return (
|
||||
<NextThemesProvider
|
||||
attribute="class"
|
||||
defaultTheme="light"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</NextThemesProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user