Last active
June 20, 2022 12:08
-
-
Save itsramiel/fee26b723e6e84e565697b8b1a6964bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const style2 = useAnimatedStyle(() => { | |
return { | |
width: VIEW_HEIGHT, | |
height: VIEW_WIDTH, | |
backgroundColor: "white", | |
position: "absolute", | |
top: FAB_SIZE / 2 - VIEW_HEIGHT / 2, | |
left: FAB_SIZE / 2 - VIEW_WIDTH / 2 | |
}; | |
}, []); | |
return ( | |
<View style={styles.container}> | |
<StatusBar style="auto" /> | |
<AnimatedPressable | |
style={[styles.fabContainer, FabStyle]} | |
onPress={() => (progress.value = withTiming(1))} | |
onLongPress={() => (progress.value = withTiming(0))} | |
> | |
<Animated.View style={style1} /> | |
<Animated.View style={style2} /> | |
</AnimatedPressable> | |
</View> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment