react-native-image-progress icon indicating copy to clipboard operation
react-native-image-progress copied to clipboard

Style not applied to Image when using fastimage

Open nicoladj77 opened this issue 3 years ago • 1 comments

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,
    }}
  />

nicoladj77 avatar May 16 '22 19:05 nicoladj77

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

Ducnhat96 avatar Jul 26 '22 08:07 Ducnhat96