Update StarRating animation to simplify scale transition logic

This commit is contained in:
2026-03-07 13:30:58 -05:00
parent a5393792c7
commit ccd482db4e
6 changed files with 107 additions and 67 deletions
@@ -42,7 +42,11 @@ export function StarRating({ value, onChange }: StarRatingProps) {
animate={
filled && star === value ? { scale: [1, 1.25, 1] } : { scale: 1 }
}
transition={springTransition}
transition={
filled && star === value
? { type: "tween", duration: 0.3, ease: "easeInOut" }
: springTransition
}
>
{filled ? (
<IconStarFilled className="size-4.5 text-primary" />