Avatar: extraneous `console.warn` about missing `statusLabel`
Closed this issue · 2 comments
tgohn commented
Expectations
No console.warn
about missing statusLabel
is logged when using <Avatar />
component without status
or badge
props.
Consumer of <Avatar />
should not need to add statusLabel
props if they do not render avatar's badge or status icons.
Reality
When using a vanilla <Avatar />
component without status
or badge
props, there is a extraneous console.warn
Warning: you did not provide a customized/translated `statusLabel` text value for <Avatar>. Zendesk Garden is rendering <Avatar statusLabel="status"> by default.
Steps to Reproduce
- Visit this codesandbox, which is the first example of
<Avatar/>
in the guide console.warn
was printed out, similar to screenshot above
Fine Print
- Component:
Avatar
- Version:
v8.64.0
- Browsers: all
tgohn commented
There is a relevant discussion here prior.