-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Inline CSS is stretching images #57
Comments
hey, can you try with |
Yes, that's the prop that I'm using. |
oh ok, did you supply image Yea, I think I can expose an image style prop, so you can apply your own style. |
Thanks for your quick response. Yes, I added the width and height when using applyAspectRatio. The library is working perfect. The CSS is what needs improvement. You can replace the previous code and add this:
Yess, it would be awesome if you can expose the style :D |
I will expose the style for you, I will work on it this week. |
https://github.com/bluebill1049/react-simple-img/releases/tag/v2.3.0 you can try with |
Hi, thanks for adding the new feature. How can I use it? like this?
|
Yes |
It's not working :S |
https://codesandbox.io/s/lazyloadingsimplereactimg-zpcvg |
Hey, Did you take another look? please close the issue if its resolved thanks |
@bluebill1049 this prop is super useful but I had to search through the issues to find it. Any chance it can be added to the documentation? |
sure @oquirozm u want to submit a PR to update readme? |
@bluebill1049 sure, will do in a bit |
Hi, in our company we have been using your library and it is working perfectly.
However, we noticed that the inline CSS is stretching the images.
We wrote the css that you need to add in order to avoid this problem.
So, instead of using this
You need to add this
Then, the image looks better.
You can see a live version of the technique here: Mipon
In case that you prefer keep using the same CSS, is it possible that we can add our own css to the img?
You can check this library as a reference:
reactjs/react-tabs#148
The logic is the same, but the library allows to customize the CSS using StyledComponents.
Thanks! have a great weekend.
The text was updated successfully, but these errors were encountered: