-
Notifications
You must be signed in to change notification settings - Fork 221
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
Rebuild Avatar
component
#1738
Labels
Comments
It seems like |
This was referenced Nov 29, 2022
Avatar
to use our createComponent
Avatar
component
10 tasks
Closing this out, Avatar does not need to be a compound component. The remaining work for restyling is a duplicate for canvas-kit #2779 |
10 tasks
alanbsmith
pushed a commit
that referenced
this issue
Aug 7, 2024
Fixes: [#1738](#1738) Refactored Avatar to use our new styling utilities and tokens. Also updated documentation to use MDX. [category:Components] Release Note: The Avatar component has been refactored to use our new tokens and styling utilities. The changes below highlight the breaking changes to the API. ### BREAKING CHANGES - Avatar no longer uses `SystemIconCircle` for sizing. - `Avatar.Size` is no longer supported. The `size` prop type has change to accept the following: `"extraExtraLarge" | "extraLarge" | "large" | "medium" | "small" | "extraSmall" | (string{})` - `Avatar.Variant` is no longer supported. Enum `AvatarVariant` has been removed. The `variant` type prop now accepts `"dark" | "light"` - The `as` prop now accepts any element, not just `div`. Co-authored-by: krissy.conant <[email protected]> Co-authored-by: @mannycarrera4 <[email protected]> Co-authored-by: manuel.carrera <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
💡 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 likealtText
or default the element to adiv
when needed.The text was updated successfully, but these errors were encountered: