Skip to content
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

Black background on Images when using borderRadius property in Styles #39

Open
AbdullahQureshi1080 opened this issue Jun 9, 2022 · 0 comments

Comments

@AbdullahQureshi1080
Copy link

Hi, I have been using react-native-scalable-image for my images but there is a weird black background when I am providing both width and height to the ScaleableComponent.

Using react-native 0.64.2
"react-native-scalable-image": "^1.1.0",

 <ScalableImage
   source={{
             uri: item.ordered_items[0].image_url,
    }}
    width={widthScaleSub(64) / 2}
    height={heightScale(140)}
    style={[
      styles.listCardFirstImage,
     ]}
  resizeMode="contain"
    />

Styles

 listCardFirstImage: {
      width: widthScaleSub(64) / 2,
      height: heightScale(140),  
      backgroundColor: color.bgDark,
      borderRadius: heightScale(10),
   },
    

Note: When removing the borderRadius the black background is gone, what is happening in the background.

Some context or help would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant