-
Notifications
You must be signed in to change notification settings - Fork 2
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -9,6 +9,11 @@ const Variations = () => ( | |||
description="An Avatar can show the image of the user." | |||
examplePath="components/Avatar/Variations/AvatarExampleSrc" | |||
/> | |||
<ComponentExample | |||
title="Alt" | |||
description="An Avatar showing image can propagate the alternative text to the image." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very helpful description. Grammar suggestion:
An Avatar can specify alternative text for the image.
|
||
static rules = avatarRules | ||
|
||
static variables = avatarVariables | ||
|
||
static propTypes = { | ||
/** The alternative text for the image used in the Avatar. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: