-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP-9963 - [Component] AnimatedPressable #2324
Conversation
onPressIn={onPressIn} | ||
onPressOut={onPressOut} | ||
{...props} | ||
style={[animatedStyle, props.style]}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we order like this? [props.style, animatedStyle]
. I don't think we want the opacity and transform to be overridden by mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct.
const opacity = useSharedValue(0) | ||
const scale = useSharedValue(0.8) | ||
export const AnimateFadeScale = memo( | ||
({ children, delay = 0 }: { children: JSX.Element; delay?: number }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it not give you warning about the missing return type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't show any warning. On hover it does show that the component returns a React.JSX.Element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ thanks!
Description
Ticket: CP-9963
Component will be reused for animating cards/buttons/boxes.
Functionality:
Screenshots/Videos
Screen.Recording.2025-02-26.at.20.24.02.mov
Testing
Not much to test, component will be reused on most animations for cards/texts
Checklist
Please check all that apply (if applicable)