1
0
mirror of https://github.com/bitwarden/web synced 2025-12-17 08:43:14 +00:00

add circle input for avatar

This commit is contained in:
Kyle Spearrin
2018-07-03 15:11:58 -04:00
parent 6d731e2939
commit 9cf15e37ce
5 changed files with 97 additions and 4 deletions

View File

@@ -8,7 +8,8 @@ import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'app-avatar',
template: '<img [src]="sanitizer.bypassSecurityTrustResourceUrl(src)" title="{{data}}">',
template: '<img [src]="sanitizer.bypassSecurityTrustResourceUrl(src)" title="{{data}}" ' +
'[ngClass]="{\'rounded-circle\': circle}">',
})
export class AvatarComponent implements OnChanges, OnInit {
@Input() data: string;
@@ -19,6 +20,7 @@ export class AvatarComponent implements OnChanges, OnInit {
@Input() fontSize = 20;
@Input() fontWeight = 300;
@Input() dynamic = false;
@Input() circle = false;
src: string;