This commit introduces a `ThemeProvider` component and a `ThemeBtnSelector` component. The `ThemeProvider` component applies the current theme to all its children. The `ThemeBtnSelector` component provides a dropdown menu that allows users to select a theme ("light", "dark", or "system").
10 lines
326 B
TypeScript
10 lines
326 B
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { ThemeProvider as NextThemesProvider } from "next-themes"
|
|
import { type ThemeProviderProps } from "next-themes/dist/types"
|
|
|
|
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
|
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
|
|
}
|