refactor animations once again

This commit is contained in:
2026-06-16 15:41:03 +02:00
parent 63b0405a7a
commit 865ef0b316
7 changed files with 275 additions and 107 deletions

View File

@@ -6,16 +6,20 @@ const AnimatePopUp = ({
position,
className,
duration=1,
ease='elastic'
ease='elastic',
scrollOnly=false,
once=false,
}:{
children:ReactNode
position:gsap.Position,
className?:HTMLAttributes<HTMLDivElement>['className']
duration?:number,
ease?:gsap.EaseString|gsap.EaseFunction
ease?:gsap.EaseString|gsap.EaseFunction,
scrollOnly?:boolean,
once?:boolean,
}) => {
return (
<AnimatedDiv children={children} position={position} className={cn(className,'h-0 translate-y-[50] overflow-hidden')} height='auto' y={0} overflow='' ease={ease} duration={duration} />
<AnimatedDiv children={children} position={position} scrollOnly={scrollOnly} once={once} className={cn(className,'h-0 translate-y-[50] overflow-hidden')} height='auto' y={0} overflow='' ease={ease} duration={duration} />
)
}