-
-
Notifications
You must be signed in to change notification settings - Fork 1k
[iOS] Fix activeOpacity in BorderlessButton
#3433
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
Conversation
src/components/GestureButtons.tsx
Outdated
| >((props, ref) => <InnerBaseButton innerRef={ref} {...props} />); | ||
|
|
||
| const AnimatedBaseButton = Animated.createAnimatedComponent(BaseButton); | ||
| const AnimatedBaseButton = React.forwardRef<any, BaseButtonWithRefProps>( |
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.
I think we can narrow down this, and other instances of any to React.ComponentType.
The other instances occur on lines: 153, 225 and 266.
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.
Done in f8d7629
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.
I think you might've missed the any occurrence on line 153.
Were there any type issues when changing that occurrence from any to React.ComponentType?
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.
You're right, fixed in b22b0fc
latekvo
left a comment
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.
lgtm
Description
Currently
activeOpacityproperty inBorderlessButtondoesn't work. It seems like it was broken by #2903. In this PR,AnimatedBaseButtonis created fromInnerBaseButtoninstead ofBaseButton(which is a wrapper), so that props are correctly passed into animated view.Fixes #3426
Test plan
Tested on the following example: