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

Style not applied to Image when using fastimage #107

Open
nicoladj77 opened this issue May 16, 2022 · 1 comment
Open

Style not applied to Image when using fastimage #107

nicoladj77 opened this issue May 16, 2022 · 1 comment

Comments

@nicoladj77
Copy link

I created a wrapper component:

import React from 'react';
import { createImageProgress } from 'react-native-image-progress';
import ProgressBar from 'react-native-progress/Bar';
import FastImage from 'react-native-fast-image';

const Image = createImageProgress(FastImage);
const ImageWithProgress = (props) => {
  return <Image indicator={ProgressBar} style={props.style} {...props} />;
};

export default ImageWithProgress;

The issue is that style is not applied even when specified, for example here the bordrRadius is ignored, while it works correctly with FastImage

  <ImageWithProgress
    source={image}
    style={{
      height: '100%',
      width: '100%',
      resizeMode: 'cover',
      borderRadius: 20,
    }}
  />
@Ducnhat96
Copy link

Ducnhat96 commented Jul 26, 2022

You can using imageStyle:
imageStyle = {{
borderRadius: 8,
}}

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

2 participants