MCPcopy
hub / github.com/danielpetho/fancy / animate

Function animate

src/fancy/components/text/underline-comes-in-goes-out.tsx:94–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92 }, [underlineHeightRatio, underlinePaddingRatio])
93
94 const animate = async () => {
95 if (blocked) return
96
97 setBlocked(true)
98
99 await controls.start({
100 width: "100%",
101 transition,
102 transitionEnd: {
103 left: direction === "left" ? "auto" : 0,
104 right: direction === "left" ? 0 : "auto",
105 },
106 })
107
108 await controls.start({
109 width: 0,
110 transition,
111 transitionEnd: {
112 left: direction === "left" ? 0 : "",
113 right: direction === "left" ? "" : 0,
114 },
115 })
116
117 setBlocked(false)
118 }
119
120 return (
121 <MotionComponent

Callers 10

LetterSwapPingPongFunction · 0.70
Letter3DSwapFunction · 0.70
RandomLetterSwapForwardFunction · 0.70
RandomLetterSwapPingPongFunction · 0.70
hoverStartFunction · 0.70
handleMouseMoveFunction · 0.50
box-carousel.tsxFile · 0.50
ElasticLineFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected