-
Notifications
You must be signed in to change notification settings - Fork 32
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 component refactor #627
base: main
Are you sure you want to change the base?
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.Image
component. 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
, andsources
props, 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 updatedImage
component, they can simply use the<picture>
element directly, for example:What should reviewers focus on?
Image
componentaspectRatio
,as
,media
, andsources
) are updated to use the new APICard.Image
component is still styled correctly after the changesSupporting resources (related issues, external links, etc):
Contributor checklist:
Reviewer checklist:
Screenshots: