Closed aeciolevy closed 5 years ago
The way that I could solve was checking if there is a height, I should override the common style with the height:
commonStyle = {...commonStyle, height: `${height || commonStyle.height}`};
Let me know if can be a fixed and if I should submit a PR. Thanks
Wow nice you are using suspense already ❤️ !
There is a imgClassName
prop, but looks like you are using inline style. maybe i can have an inline style prop to overwrite my default common style.
eg.
placeHolderStyle
imgStyle
i can probably working on that over the weekend.
actually inline Style is probably not best solution, it's better keep at the classname level, especially due to media query with different breakpoints. can you try out with imgClassName
with css?
Bill,
What I did was just add on the common style of the library.
I think is good to merge the style with the inline style user want to override.
The problem is that the placeholder has a different size of the actual image. I guess it has to enforce the same size to have a nice lazy load effect.
Please let me know if would like to split any task, I am helping to contribute.
i will take a look at the issue, see if i can resolve it without add any new props, but feel free to contribute your idea. would be great to make it work perfect.
hey @aeciolevy,
i think i have nailed it on 1.4.5, upgrade and let me know if that works for you.
thanks bill
Hey Bill, It is working... Thanks!!!!
Hi, Blue I am using SimpleImg, but when I wanna load an image with a specific size, it loads the placeholder in a different place with a different size. This is the wrapper.
And usage