-
Notifications
You must be signed in to change notification settings - Fork 54
Image component refactor #627
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
Conversation
🦋 Changeset detectedLatest commit: 0b4584e The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
|
0629f03 to
e20b2e2
Compare
e20b2e2 to
9a01a13
Compare
debaa83 to
552132e
Compare
552132e to
8269ca3
Compare
4117c97 to
89b1028
Compare
b3e748f to
0b4584e
Compare

Summary
Refactor Image component to simplify its API, improve maintainability, and reduce the number of edge-cases due to conflicting props.
List of notable changes:
Card.Imagecomponent. It was previously possible for the div that wraps the image and the image itself to have different border radii (that's not a word I get to write often).as,media, andsourcesprops, as well code paths which render a<picture>element. This element added complexity to the implementation without providing any real benefit over a native HTML approach. If a user wants to use a<picture>element with the updatedImagecomponent, they can simply use the<picture>element directly, for example:What should reviewers focus on?
ImagecomponentaspectRatio,as,media, andsources) are updated to use the new APICard.Imagecomponent is still styled correctly after the changesSupporting resources (related issues, external links, etc):
Contributor checklist:
Reviewer checklist:
Screenshots: