fix cv animations
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
"use client"
|
||||
import { useRef, type HTMLAttributes, type ReactNode } from "react";
|
||||
import { SplitText } from "gsap/SplitText";
|
||||
import gsap from 'gsap'
|
||||
@@ -11,6 +12,7 @@ const AnimateTextIn = ({
|
||||
speed = 1,
|
||||
scrollOnly = false,
|
||||
once = false,
|
||||
debugId,
|
||||
className
|
||||
}: {
|
||||
children: ReactNode,
|
||||
@@ -18,6 +20,7 @@ const AnimateTextIn = ({
|
||||
position?: gsap.Position,
|
||||
scrollOnly?: boolean,
|
||||
once?: boolean,
|
||||
debugId?: string,
|
||||
speed?: number,
|
||||
className?: HTMLAttributes<HTMLDivElement>['className']
|
||||
}) => {
|
||||
@@ -26,7 +29,7 @@ const AnimateTextIn = ({
|
||||
position,
|
||||
scrollOnly,
|
||||
once,
|
||||
debugId: `text-${position}`,
|
||||
debugId: debugId ?? `text-${position}`,
|
||||
makeReveal: (node) => {
|
||||
// The wrapper starts at opacity 0 (so there's no flash of unsplit text);
|
||||
// reveal the wrapper and let the per-character tween do the animation.
|
||||
|
||||
Reference in New Issue
Block a user