fix: use m.button instead of motion.button in ThemeToggle

This commit is contained in:
2026-06-01 20:44:49 -05:00
parent 34ecb39bcc
commit 04fab4ce38

View File

@@ -1,13 +1,13 @@
"use client";
import { useTheme } from "@wrksz/themes/client";
import { motion } from "motion/react";
import { m } from "motion/react";
export function ThemeToggle() {
const { theme, setTheme } = useTheme();
return (
<motion.button
<m.button
type="button"
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
whileHover={{ scale: 1.1 }}
@@ -20,6 +20,6 @@ export function ThemeToggle() {
) : (
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
)}
</motion.button>
</m.button>
);
}