diff --git a/.changeset/strange-walls-rescue.md b/.changeset/strange-walls-rescue.md
new file mode 100644
index 00000000..b87655b3
--- /dev/null
+++ b/.changeset/strange-walls-rescue.md
@@ -0,0 +1,5 @@
+---
+"nextjs-darkmode": patch
+---
+
+Fix peerDeps
diff --git a/examples/nextjs/next-env.d.ts b/examples/nextjs/next-env.d.ts
index 1b3be084..3cd7048e 100644
--- a/examples/nextjs/next-env.d.ts
+++ b/examples/nextjs/next-env.d.ts
@@ -1,5 +1,6 @@
///
///
+///
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/lib/package.json b/lib/package.json
index 47e7180e..93969019 100644
--- a/lib/package.json
+++ b/lib/package.json
@@ -77,8 +77,8 @@
"r18gs": "2.0.2"
},
"peerDependencies": {
- "@types/react": "16.8 - 19",
- "react": "16.8 - 19"
+ "@types/react": ">=16.8",
+ "react": ">=16.8"
},
"funding": [
{
diff --git a/lib/src/client/core/core.test.tsx b/lib/src/client/core/core.test.tsx
index 8cdda1db..40bc0dde 100644
--- a/lib/src/client/core/core.test.tsx
+++ b/lib/src/client/core/core.test.tsx
@@ -10,7 +10,7 @@ describe("theme-switcher", () => {
afterEach(cleanup);
beforeEach(() => {
- noFOUCScript(STORAGE_KEY);
+ noFOUCScript(STORAGE_KEY, "none", "");
render();
});
diff --git a/lib/src/client/core/core.tsx b/lib/src/client/core/core.tsx
index 65d451a8..2318ba72 100644
--- a/lib/src/client/core/core.tsx
+++ b/lib/src/client/core/core.tsx
@@ -6,18 +6,22 @@ let media: MediaQueryList,
updateDOM: (mode: ColorSchemePreference, systemMode: ResolvedScheme) => void;
interface ScriptProps {
+ /** themeTransition */
+ t: string;
/** nonce */
- n?: string;
+ n: string;
/** storageKey */
k: string;
}
/** Avoid rerender of script */
-const Script = ({ n, k }: ScriptProps) => (
+const Script = ({ n, k, t }: ScriptProps) => (