diff options
Diffstat (limited to 'apps/web/components/text-shimmer.tsx')
| -rw-r--r-- | apps/web/components/text-shimmer.tsx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/web/components/text-shimmer.tsx b/apps/web/components/text-shimmer.tsx index 1825d08c..691a38cf 100644 --- a/apps/web/components/text-shimmer.tsx +++ b/apps/web/components/text-shimmer.tsx @@ -28,6 +28,7 @@ function TextShimmerComponent({ return ( <MotionComponent + animate={{ backgroundPosition: "0% center" }} className={cn( "relative inline-block bg-[length:250%_100%,auto] bg-clip-text", "text-transparent [--base-color:#a1a1aa] [--base-gradient-color:#000]", @@ -36,18 +37,18 @@ function TextShimmerComponent({ className, )} initial={{ backgroundPosition: "100% center" }} - animate={{ backgroundPosition: "0% center" }} - transition={{ - repeat: Infinity, - duration, - ease: "linear", - }} style={ { "--spread": `${dynamicSpread}px`, - backgroundImage: `var(--bg), linear-gradient(var(--base-color), var(--base-color))`, + backgroundImage: + "var(--bg), linear-gradient(var(--base-color), var(--base-color))", } as React.CSSProperties } + transition={{ + repeat: Number.POSITIVE_INFINITY, + duration, + ease: "linear", + }} > {children} </MotionComponent> |