cosmos
cosmos copied to clipboard
Avatar image prop is confusing
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
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
nameprop 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
@siddharthkp @francocorreasosa can check this out as part of the API review?