tailwind-nextjs-blog/app/theme-providers.tsx

13 lines
324 B
TypeScript
Raw Normal View History

2023-08-16 23:28:02 +08:00
'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>
)
}