tailwind-nextjs-blog/app/theme-providers.tsx
Ivan Li 3932a2b612
Some checks failed
🚀 Build and deploy by ftp / 🎉 Deploy (push) Failing after 8m21s
style: 迁移到 v2.
2023-08-16 23:57:24 +08:00

16 lines
346 B
TypeScript

'use client';
import { ThemeProvider } from 'next-themes';
import siteMetadata from '@/data/siteMetadata';
export function ThemeProviders({ children }: { children: React.ReactNode }) {
return (
<ThemeProvider
attribute="class"
defaultTheme={siteMetadata.theme}
enableSystem>
{children}
</ThemeProvider>
);
}