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

Improvements to the Image component #41

Merged
merged 10 commits into from
Jan 3, 2022
Merged

Improvements to the Image component #41

merged 10 commits into from
Jan 3, 2022

Conversation

dbismut
Copy link
Contributor

@dbismut dbismut commented Jan 2, 2022

This PR does the following:

  • minor code fixes such as adding default values in parameters to reduce clutter, removal of unnecessary useCallback
  • fix: allow overwriting of the style.position attribute
  • fix: removal of the transition delay (this is debatable)
  • feat: add onLoad prop to let users perform custom logic when the image loads
  • feat: add usePlaceholder prop to allow for not showing the blurry placeholder
  • feat: add the ability for users to pass a ref to the element

@dbismut
Copy link
Contributor Author

dbismut commented Jan 3, 2022

I should add that unfortunately the ref commit kinda adds indentation to most of the code, which makes diffing a bit unpractical. I would suggest looking at each commit separately to better review the changes.

@stefanoverna stefanoverna merged commit e4a2119 into datocms:master Jan 3, 2022
@stefanoverna
Copy link
Member

Looking good! Thanks so much @dbismut, released as 1.6.9!

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

Successfully merging this pull request may close these issues.

2 participants