canvas-kit icon indicating copy to clipboard operation
canvas-kit copied to clipboard

Rebuild `Avatar` component

Open mannycarrera4 opened this issue 3 years ago • 1 comments

💡 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

mannycarrera4 avatar Aug 22 '22 15:08 mannycarrera4

It seems like popper use forwardRef to create component too.

RayRedGoose avatar Aug 22 '22 15:08 RayRedGoose

Closing this out, Avatar does not need to be a compound component. The remaining work for restyling is a duplicate for canvas-kit #2779

myvuuu avatar Jun 17 '24 17:06 myvuuu