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

Added Avatar image prop #287

Closed
wants to merge 1 commit into from
Closed

Conversation

Reggionick
Copy link
Contributor

No description provided.

@Reggionick Reggionick linked an issue Jul 19, 2022 that may be closed by this pull request
@kanbanbot kanbanbot added the WIP label Jul 19, 2022
@vercel
Copy link

vercel bot commented Jul 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
bento-docs ✅ Ready (Inspect) Visit Preview Jul 20, 2022 at 3:44PM (UTC)
bento-playroom ✅ Ready (Inspect) Visit Preview Jul 20, 2022 at 3:44PM (UTC)

Copy link
Member

@gabro gabro left a comment

Choose a reason for hiding this comment

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

A couple of comments inline, plus:

  • can we add a story for the "fallback" case? (e.g. with a broken url which doesn't load)
  • I think we need to clip the image (e.g. try with a squared image, I would expect it not to overflow)

Comment on lines 54 to 61
<img
style={{ display: imageAvailable ? "block" : "none" }}
src={imageSrc}
className={avatarImage({})}
onLoad={handleImageLoaded}
onError={handleImageErrored}
/>
Copy link
Member

Choose a reason for hiding this comment

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

I propose we use <Box as="img"> here, which also gives you the ability to use display directly (<Box display={imageAvailable ? "block" : "none"} />)

Comment on lines 27 to 29
export const avatarImage = strictRecipe({
base: bentoSprinkles({
width: "full",
}),
});
Copy link
Member

Choose a reason for hiding this comment

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

no need to use a recipe here, you can directly use bentoSprinkles.

@kanbanbot kanbanbot added WIP and removed in review labels Jul 20, 2022
@Reggionick Reggionick force-pushed the 275-support-images-in-avatar branch from bc532aa to 74948aa Compare July 20, 2022 15:40
@Reggionick Reggionick requested a review from gabro July 20, 2022 15:40
@Reggionick Reggionick enabled auto-merge July 21, 2022 08:45
@Reggionick Reggionick added in review and removed WIP labels Jul 21, 2022
@buildo buildo deleted a comment from rollingversions bot Jul 21, 2022
@gabro gabro closed this Oct 14, 2022
auto-merge was automatically disabled October 14, 2022 10:03

Pull request was closed

@marcopiii marcopiii deleted the 275-support-images-in-avatar branch October 14, 2022 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support images in Avatar
3 participants