big upgrade
This commit is contained in:
1 parent
5bd2019fc6
commit
f7dd547f8d
38 files changed
+2363
-329
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
||||
import type { ThemeProviderProps as NextThemeProviderProps } from "next-themes";
|
||||
|
||||
export interface ThemeProviderProps extends Omit<NextThemeProviderProps, "children"> {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
||||
return (
|
||||
<NextThemesProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem={true}
|
||||
storageKey="theme"
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</NextThemesProvider>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user