24 lines
422 B
TypeScript
24 lines
422 B
TypeScript
'use client';
|
|
|
|
import { ThemeProvider as NextThemesProvider } from 'next-themes';
|
|
|
|
export default function ThemeProvider({
|
|
children,
|
|
nonce,
|
|
}: {
|
|
children: React.ReactNode;
|
|
nonce?: string;
|
|
}) {
|
|
return (
|
|
<NextThemesProvider
|
|
attribute="class"
|
|
defaultTheme="dark"
|
|
enableSystem={false}
|
|
themes={['light', 'dark']}
|
|
nonce={nonce}
|
|
>
|
|
{children}
|
|
</NextThemesProvider>
|
|
);
|
|
}
|