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

fix: [types] allow Image "href" & "xlinkHref" to be strings #1896

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

slavikdenis
Copy link
Contributor

Summary

Allow 'string' type for href and xlinkHref props in Image component.
Logic in the component allows passing 'string' values to the Image.resolveAssetSource by checking for its type, so it would be nice to reflect it on the properties types as well.

Screenshot 2022-10-20 at 12 43 24

Test Plan

Purely typing changes, so you can see at least how I was able to remove now-useless @ts-expect-errors in the example app.

What's required for testing (prerequisites)?

not applicable

What are the steps to reproduce (after prerequisites)?

not applicable

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added documentation in README.md
  • I updated the typed files (typescript)
  • I added a test for the API in the __tests__ folder

Copy link
Member

@WoLewicki WoLewicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for your contribution 🎉

@WoLewicki WoLewicki merged commit 65f373b into software-mansion:main Oct 21, 2022
@slavikdenis slavikdenis deleted the image-href-source branch October 21, 2022 13:12
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