This commit is contained in:
@@ -2,6 +2,19 @@
|
||||
|
||||
import { ThemeProvider as NextThemesProvider, type ThemeProviderProps } from "next-themes";
|
||||
|
||||
const defaultThemeProps: ThemeProviderProps = {
|
||||
attribute: "class",
|
||||
defaultTheme: "system",
|
||||
enableSystem: true,
|
||||
disableTransitionOnChange: true,
|
||||
enableColorScheme: true,
|
||||
storageKey: "mohfarawati-theme",
|
||||
};
|
||||
|
||||
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
||||
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
|
||||
return (
|
||||
<NextThemesProvider {...defaultThemeProps} {...props}>
|
||||
{children}
|
||||
</NextThemesProvider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user