Skip to content

Commit 7a233db

Browse files
authored
mgt-person: fix avatar scaling issue (#2071)
- added story to demonstrate - fixes: #2070
1 parent ac448bf commit 7a233db

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/mgt-components/src/components/mgt-person/mgt-person.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ mgt-person .person-root {
267267
border: $avatar-border;
268268
border-radius: $avatar-border-radius;
269269
position: relative;
270+
box-sizing: border-box;
270271

271272
img {
272273
position: absolute;

stories/components/person/person.properties.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ export const moreExamples = () => html`
298298
--avatar-size: 60px;
299299
--avatar-border-radius: 10% 35%;
300300
}
301+
302+
.person-with-avatar-border {
303+
--avatar-border: 2px solid black;
304+
}
301305
</style>
302306
303307
<div class="example">
@@ -341,6 +345,11 @@ export const moreExamples = () => html`
341345
<mgt-person person-query="me" view="twoLines"></mgt-person>
342346
</div>
343347
348+
<div class="example">
349+
<div>Avatar with border (see css tab for style)</div>
350+
<mgt-person class="person-with-avatar-border" person-query="me" avatar-size="large" view="oneline"></mgt-person>
351+
</div>
352+
344353
<div class="example">
345354
<div>Style initials (see css tab for style)</div>
346355
<mgt-person class="person-initials" person-query="[email protected]" view="oneline"></mgt-person>

0 commit comments

Comments
 (0)