Skip to content

Commit 3c0bc13

Browse files
committed
fix(text-underline): making hover to div
1 parent 1762a8e commit 3c0bc13

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

registry/components/magicui/text-underline.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,22 @@ export default function TextUnderline({
4444
};
4545

4646
return (
47-
<motion.span
48-
className={cn(
49-
"bg-no-repeat !inline bg-right-bottom transition-[background-size] ease-linear hover:bg-left-bottom",
50-
className,
51-
)}
52-
style={backgroundStyle}
47+
<motion.div
48+
whileHover="hover"
5349
variants={textVariants}
5450
initial="initial"
55-
whileHover="hover"
51+
animate="initial"
5652
>
57-
{word}
58-
</motion.span>
53+
<motion.span
54+
className={cn(
55+
"bg-no-repeat !inline bg-right-bottom transition-[background-size] ease-linear hover:bg-left-bottom",
56+
className,
57+
)}
58+
style={backgroundStyle}
59+
variants={textVariants}
60+
>
61+
{word}
62+
</motion.span>
63+
</motion.div>
5964
);
6065
}

0 commit comments

Comments
 (0)