Skip to content

Commit

Permalink
mgt-person: fix avatar scaling issue (#2071)
Browse files Browse the repository at this point in the history
- added story to demonstrate
- fixes: #2070
  • Loading branch information
JoshWhite committed Mar 2, 2023
1 parent ac448bf commit 7a233db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ mgt-person .person-root {
border: $avatar-border;
border-radius: $avatar-border-radius;
position: relative;
box-sizing: border-box;

img {
position: absolute;
Expand Down
9 changes: 9 additions & 0 deletions stories/components/person/person.properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ export const moreExamples = () => html`
--avatar-size: 60px;
--avatar-border-radius: 10% 35%;
}
.person-with-avatar-border {
--avatar-border: 2px solid black;
}
</style>
<div class="example">
Expand Down Expand Up @@ -341,6 +345,11 @@ export const moreExamples = () => html`
<mgt-person person-query="me" view="twoLines"></mgt-person>
</div>
<div class="example">
<div>Avatar with border (see css tab for style)</div>
<mgt-person class="person-with-avatar-border" person-query="me" avatar-size="large" view="oneline"></mgt-person>
</div>
<div class="example">
<div>Style initials (see css tab for style)</div>
<mgt-person class="person-initials" person-query="alex@fineartschool.net" view="oneline"></mgt-person>
Expand Down

0 comments on commit 7a233db

Please sign in to comment.