cosmos icon indicating copy to clipboard operation
cosmos copied to clipboard

Avatar image prop is confusing

Open landitus opened this issue 6 years ago • 1 comments
trafficstars

Describe the bug I believe this is something to tackle in #1225. I think the image prop for Avatar is confusing as it accepts a url (string) but also another node, like Image, but not restricted to image. For example, we can pass any component or an html or tags.

Proposal

  • Can we restrict it to an URL string? This is primarily because we take the url internally and create an image component (with fit properties as well)
  • We'll probably need to add a name prop that can be used internally as an alt for the Image.

References

  • https://atlaskit.atlassian.com/packages/core/avatar
  • https://polaris.shopify.com/components/images-and-icons/avatar

Additional context Check the playground

landitus avatar Jan 04 '19 17:01 landitus

@siddharthkp @francocorreasosa can check this out as part of the API review?

landitus avatar Jan 04 '19 17:01 landitus