organize
This commit is contained in:
@@ -24,10 +24,6 @@ export const GrowWrapper = React.forwardRef(function GrowWrapper(
|
|||||||
},
|
},
|
||||||
ref,
|
ref,
|
||||||
) {
|
) {
|
||||||
useImperativeHandle(ref, () => ({
|
|
||||||
reset,
|
|
||||||
}))
|
|
||||||
|
|
||||||
const scale = useSharedValue(1)
|
const scale = useSharedValue(1)
|
||||||
const animationDidComplete = useSharedValue(false)
|
const animationDidComplete = useSharedValue(false)
|
||||||
|
|
||||||
@@ -56,11 +52,15 @@ export const GrowWrapper = React.forwardRef(function GrowWrapper(
|
|||||||
}
|
}
|
||||||
}, [animationDidComplete, reset])
|
}, [animationDidComplete, reset])
|
||||||
|
|
||||||
|
useImperativeHandle(ref, () => ({
|
||||||
|
reset,
|
||||||
|
}))
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnimatedPressable
|
<AnimatedPressable
|
||||||
onPressIn={onTouchStart}
|
|
||||||
style={animatedStyle}
|
style={animatedStyle}
|
||||||
unstable_pressDelay={300}
|
unstable_pressDelay={300}
|
||||||
|
onPressIn={onTouchStart}
|
||||||
onTouchEnd={onTouchEnd}>
|
onTouchEnd={onTouchEnd}>
|
||||||
{children}
|
{children}
|
||||||
</AnimatedPressable>
|
</AnimatedPressable>
|
||||||
|
|||||||
Reference in New Issue
Block a user