Skip to content

Commit

Permalink
darkmode only
Browse files Browse the repository at this point in the history
  • Loading branch information
mugrebot committed Dec 12, 2024
1 parent 39409c9 commit cf2f57d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/nextjs/components/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { type ThemeProviderProps } from "next-themes/dist/types";
import { ReactNode } from "react";

export const ThemeProvider = ({ children, ...props }: ThemeProviderProps) => {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
};
export function ThemeProvider({ children }: { children: ReactNode }) {
return (
<NextThemesProvider
attribute="data-theme"
defaultTheme="dark"
forcedTheme="dark"
enableSystem={false}
disableTransitionOnChange
>
{children}
</NextThemesProvider>
);
}

0 comments on commit cf2f57d

Please sign in to comment.