Skip to content

Commit

Permalink
Exposed mgt-person methods as protected (#751)
Browse files Browse the repository at this point in the history
Co-authored-by: Nikola Metulev <[email protected]>
Co-authored-by: Beth Pan <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2020
1 parent 594d5c9 commit c6cf105
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions packages/mgt/src/components/mgt-person/mgt-person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,14 @@ export class MgtPerson extends MgtTemplatedComponent {
return person && person.personImage ? person.personImage : null;
}

private getInitials(person?: IDynamicPerson) {
/**
* Gets the user initials
*
* @protected
* @returns {string}
* @memberof MgtPerson
*/
protected getInitials(person?: IDynamicPerson): string {
if (!person) {
person = this.personDetails;
}
Expand Down Expand Up @@ -919,7 +926,15 @@ export class MgtPerson extends MgtTemplatedComponent {
}
}

private getColorFromName(name) {
/**
* Gets color from name
*
* @protected
* @param {string} name
* @returns {string}
* @memberof MgtPerson
*/
protected getColorFromName(name: string): string {
const charCodes = name
.split('')
.map(char => char.charCodeAt(0))
Expand Down

0 comments on commit c6cf105

Please sign in to comment.