-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Image add support for onError and onLoad callback #5945
Image add support for onError and onLoad callback #5945
Conversation
…ub.com/skathuria29/react-spectrum into image-add-support-for-onerror-callback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the addition, and test+story!
You'll need to sign the CLA for the build to pass.
Co-authored-by: Reid Barber <reid@reidbarber.com>
hey @reidbarber I'm not an external contributor. I have raised request to add company to my public GitHub profile. Waiting for approval. Please let me know in case anything else is also required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to support onError
then we should also support onLoad
, would you mind adding it?
…ub.com/skathuria29/react-spectrum into image-add-support-for-onerror-callback
@snowystinger @reidbarber Please review the changes. |
GET_BUILD |
Build successful! 🎉 |
Co-authored-by: Robert Snow <snowystinger@gmail.com>
Co-authored-by: Robert Snow <snowystinger@gmail.com>
…ub.com/skathuria29/react-spectrum into image-add-support-for-onerror-callback
GET_BUILD |
Build successful! 🎉 |
## API Changes
unknown top level export { type: 'any' } @react-spectrum/imageImage SpectrumImageProps {
alt?: string
objectFit?: any
+ onError?: ReactEventHandler<HTMLImageElement>
+ onLoad?: ReactEventHandler<HTMLImageElement>
slot?: string = 'image'
src: string
} |
@reidbarber Please review and merge the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes Github issue # 5905
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: