[EuiAvatar] Adding support for iconType, iconSize, and iconColor#4620
[EuiAvatar] Adding support for iconType, iconSize, and iconColor#4620cchaos merged 13 commits intoelastic:masterfrom
iconType, iconSize, and iconColor#4620Conversation
…rl`, or `iconType` Also updated layout to use inline-flex, and made background-image `undefined` instead of `none`
Updating all docs sections and snippets
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4620/ |
iconType, iconSize, and iconColoriconType, iconSize, and iconColor
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4620/ |
|
Code changes looking good. The test failure is due to a valid(?) axe a11y issue:
"Spaces" h4 is the one in question. |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4620/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4620/ |
thompsongl
left a comment
There was a problem hiding this comment.
LGTM with just some minor type tightening.
The imageUrl change is less impactful right now, but requiring iconType when that config section is in use will prevent setting other icon-related props when no icon is set.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4620/ |
|
I'm going to merge this in once it all goes green. |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4620/ |
EuiAvatar used to only display either initials or a static background image. This PR adds support for displaying an EuiIcon.
It updates the props to the exclusion type of either
initials,imageUrlORiconType. The avatar will continue to color and size the icon based on the color and size props of the avatar but you can override this with adjacent props oficonSizeandiconColorspecifically.Disabled:
It also adds one named color
plainmatching the name of EuiPanel's for simply a white background, and the ability to completely remove the background color withnullwhich would allow consumer's to more easily create dark/light theme colors with classNames and SASS.This PR also breaks down the docs page a little better with more sections detailing specifically the types and disabled.
Checklist
[ ] Checked for breaking changes and labeled appropriately