-
Notifications
You must be signed in to change notification settings - Fork 221
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(Avatar): Support for Non-Square Input Image for Avatar component #2337
Conversation
4982062
to
201a786
Compare
Passing run #6176 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
This is ready for review. |
Hey! Can you add the example you have in the PR description as an actual example please! |
@@ -35,6 +36,12 @@ export interface AvatarProps extends React.ButtonHTMLAttributes<HTMLButtonElemen | |||
* Will render an `div` tag instead of a `button` when defined. | |||
*/ | |||
as?: 'div'; | |||
/** | |||
* The object-fit CSS property sets how the content of a replaced element, | |||
* such as an <img> or <video>, should be resized to fit its container. |
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.
We can maybe add something like If you image is not a square, you can use this property to ensure the image is rendered properly
.
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.
Sure!
201a786
to
11b695e
Compare
Summary
Fixes: #1960
Added new property to Avatar component
object-fit
to support setting the content of a image to be resized to fit its container.Release Category
Components