-
Notifications
You must be signed in to change notification settings - Fork 734
Overlay component borderRadius fix #3058
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/overlay/index.tsx
Outdated
</> | ||
); | ||
} | ||
const isVertical = type === OVERLY_TYPES.VERTICAL; |
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.
Do you need to check this one every render?
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 don't see you took it out of the render....
src/components/overlay/index.tsx
Outdated
{type && this.renderImage(this.getStyleByType(), imageSource)} | ||
{customContent && this.renderCustomContent()} | ||
</> | ||
<View style={{overflow: 'hidden', borderRadius, ...StyleSheet.absoluteFillObject}}> |
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.
This style can move to the styleSheet while borderRadiuse can be added to an array
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.
No need for absolute, pass flex
@adids1221 The overlay gradient is messed up in your branch, see screenshots: |
Description
Overlay component fix borderRadius, when using Image component with overlayType and borderRadius the Overlay is covering the Image and leaks out.
Wrapping the Overlay with View with style fix the issue.
Added an example in the screen.
Changelog
Overlay covering fix when passing borderRadius.
Additional info
ticket 4162