canvas-kit
canvas-kit copied to clipboard
Rebuild `Avatar` component
💡 Suggestion
Avatar is still a class component which means we sometimes don't have typescript play nicely when we try to use this component as a sub component of another component. If we refactor this to use our createComponent function we'll get a lot of the typing that can allows us to omit props like altText or default the element to a div when needed.
- [ ] Convert Avatar to a compound component.
- [ ] Update Avatar to use our new style utils and CSS variable tokens
It seems like popper use forwardRef to create component too.
Closing this out, Avatar does not need to be a compound component. The remaining work for restyling is a duplicate for canvas-kit #2779