Skip to content

Commit 9c448cf

Browse files
authored
Fixes mgt-person person-card="click" not working (#373)
* fixed person-card click not working * fixed person-card click not working * Restore index.html
1 parent fdd7810 commit 9c448cf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/components/mgt-person/mgt-person.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ export class MgtPerson extends MgtTemplatedComponent {
581581
}
582582

583583
private handleMouseClick(e: MouseEvent) {
584-
if (this.personCardInteraction !== PersonCardInteraction.click) {
584+
if (this.personCardInteraction === PersonCardInteraction.click) {
585585
this.showPersonCard();
586586
}
587587
}

stories/components/person.stories.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,11 @@ export const person = () => html`
2727
export const personPhotoOnly = () => html`
2828
<mgt-person person-query="me"></mgt-person>
2929
`;
30+
31+
export const personCardHover = () => html`
32+
<mgt-person person-query="me" person-card="hover"></mgt-person>
33+
`;
34+
35+
export const personCardClick = () => html`
36+
<mgt-person person-query="me" person-card="click"></mgt-person>
37+
`;

0 commit comments

Comments
 (0)