Conversation
Codecov Report
@@ Coverage Diff @@
## master #124 +/- ##
=======================================
Coverage 69.94% 69.94%
=======================================
Files 74 74
Lines 1198 1198
Branches 227 227
=======================================
Hits 838 838
Misses 355 355
Partials 5 5
Continue to review full report at Codecov.
|
| <Avatar src="/public/images/avatar/small/matt.jpg" alt="Profile picture of Matt" /> | ||
| ) | ||
|
|
||
| export default AvatarExampleAltShorthand |
There was a problem hiding this comment.
This is a bit odd. Some components won't have shorthand examples, such as this Avatar. Unless the avatar were used in another component like this:
<SomeComponent
avatar={{ src: '//placehold.it/100', alt: 'A placeholder image' }}
/>It seems we should not require certain components like Avatar to show shorthand. Let's plan on fixing that. No need to block this PR though.
| /> | ||
| <ComponentExample | ||
| title="Alt" | ||
| description="An Avatar showing image can propagate the alternative text to the image." |
There was a problem hiding this comment.
This is a very helpful description. Grammar suggestion:
An Avatar can specify alternative text for the image.
| static variables = avatarVariables | ||
|
|
||
| static propTypes = { | ||
| /** The alternative text for the image used in the Avatar. */ |
There was a problem hiding this comment.
This is actually a nice description as well and has good grammar. It could also be used in the docs if you prefer it over my other suggestion.
levithomason
left a comment
There was a problem hiding this comment.
Please update alt description grammar using one of the suggestions.
Avatar
Adding alt property to the Avatar component, for propagation to the Image component.
Proposed API:
alt
Result: