This repository was archived by the owner on Mar 4, 2020. It is now read-only.
fix(Avatar): add white border around avatar in contrast theme#795
Merged
fix(Avatar): add white border around avatar in contrast theme#795
Conversation
Contributor
|
The issue is that, for the second example we don't update the padding on the icon according to the size of the avatar. It seems to be an issue on our side. |
alinais
approved these changes
Jan 30, 2019
…x/avatar-contrast-738
kuzhelov
reviewed
Jan 31, 2019
|   | ||
| <Avatar | ||
| image={ | ||
| // This example does not react to the avatar size variable |
Contributor
There was a problem hiding this comment.
👍 thanks for spotting this!
kuzhelov
reviewed
Jan 31, 2019
| import { Partial } from 'types/utils' | ||
|
|
||
| export default (siteVariables: any): Partial<AvatarVariables> => ({ | ||
| avatarBorderColor: 'white', |
Contributor
There was a problem hiding this comment.
would suggest to use color from siteVariables here (i.e. siteVariables.white), for the sake of consistency - or let me know if there any reason to not use it
Contributor
Author
There was a problem hiding this comment.
Good catch. Thanks!
kuzhelov
approved these changes
Jan 31, 2019
Contributor
kuzhelov
left a comment
There was a problem hiding this comment.
please, just take a look on this comment before merge: https://github.com/stardust-ui/react/pull/795/files#r252747086 . Thank you!
…x/avatar-contrast-738
…-ui/react into fix/avatar-contrast-738
This was referenced Feb 1, 2019
28 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds properties for setting the border for the avatar, which is used in the contrast theme to draw a white border around the image.


Before:
After:
Known issues:
The example in the docs with a custom image value (using Icon instead of Image) isn't rendering correctly. It seems like the example is perhaps broken, because it doesn't respect avatar size property.
Default size:


Both set to 28: