Open Willienn opened 7 months ago
About "idForColor" and "color" i decide to just pass a bg to the component via classname like this:
<Avatar status="online" className="bg-brand-primary">
<AvatarImage src="https://avatars.githubusercontent.com/u/124599?v=4" />
<AvatarFallback>Josh Well</AvatarFallback>
</Avatar>
Other way will add extra work and complexity to the component.
Avatar
An Avatar is a graphical representation of a user, team, or entity. Avatar can display an image, icon, or initials, and supports various sizes and shapes.
Tasks:
"span"
active="active"
- [ ] color: The color when displaying either an icon or initials.- neutral (default): gray- brand: color from the brand palette- colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)- specific color from the theme- [ ] idForColor: Specify a string to be used instead of the name, to determine which color to use whencolor="colorful"
.