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

Passing img properties to the img element i.e. object-fit, object-position #11

Open
Githiora opened this issue Mar 17, 2020 · 3 comments

Comments

@Githiora
Copy link

Thank you for the awesome library! Would be awesome to be able to pass object-fit and object-position settings down to the img element.

@yosbelms
Copy link
Owner

@Githiora Could you provide a usage example?

@yosbelms
Copy link
Owner

yosbelms commented Jun 15, 2020

Have you tried to wrap a Img component inside a div, and assign the position to the div wrapper?
Thank you for taking the time to create this issue, I will explore this. PRs are welcome BTW.

@yosbelms
Copy link
Owner

I'm thinking to create a new property for the Img component named rawImgStyle that can contain custom style for the underlaying img native component.

example:

<Img rawImgStyle={{objectPosition: '50%'}}/>

@Githiora Any thought about this?

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