Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: add show-presence to mgt-people-picker #2812

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
})
public disableImages: boolean;

@property({
attribute: 'show-presence',
type: Boolean
})
public showPresence: boolean;

/**
* array of user picked people.
*
Expand Down Expand Up @@ -993,7 +999,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
mgtHtml`
<mgt-person
class="person"
show-presence
?show-presence=${this.showPresence}
view="twoLines"
line2-property="jobTitle,mail"
.personDetails=${person}
Expand Down
1 change: 1 addition & 0 deletions packages/mgt-react/src/generated/people-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type PeoplePickerProps = {
people?: IDynamicPerson[];
showMax?: number;
disableImages?: boolean;
showPresence?: boolean;
selectedPeople?: IDynamicPerson[];
defaultSelectedUserIds?: string[];
defaultSelectedGroupIds?: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ export default {
decorators: [withCodeEditor]
};

export const showPresence = () => html`
<mgt-people-picker show-presence></mgt-people-picker>
`;

export const groupId = () => html`
<mgt-people-picker group-id="02bd9fd6-8f93-4758-87c3-1fb73740a315"></mgt-people-picker>
<mgt-people-picker group-id="02bd9fd6-8f93-4758-87c3-1fb73740a315"></mgt-people-picker>
`;

export const singleSelectMode = () => html`
Expand Down
Loading