-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3445 from IgniteUI/avatar-box-sizing
fix(avatar): allow for more robust styling of the avatar to fix border issues
- Loading branch information
Showing
7 changed files
with
242 additions
and
119 deletions.
There are no files selected for viewing
16 changes: 7 additions & 9 deletions
16
projects/igniteui-angular/src/lib/avatar/avatar.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
<ng-template #defaultTemplate> | ||
<ng-content></ng-content> | ||
</ng-template> | ||
|
||
<ng-template #imageTemplate> | ||
<div #image [style.backgroundImage]="getSrcUrl()" class="igx-avatar__image" [style.backgroundColor]="bgColor" [attr.aria-roledescription]="roleDescription" | ||
></div> | ||
<div #image class="igx-avatar__image" [style.backgroundImage]="getSrcUrl()"></div> | ||
</ng-template> | ||
|
||
<ng-template #initialsTemplate> | ||
<div class="igx-avatar__initials" [style.backgroundColor]="bgColor" [style.color]="color" [attr.aria-roledescription]="roleDescription"> | ||
<span>{{initials.substring(0, 2)}}</span> | ||
</div> | ||
<span>{{initials.substring(0, 2)}}</span> | ||
</ng-template> | ||
|
||
<ng-template #iconTemplate> | ||
<span class="igx-avatar__icon" [style.backgroundColor]="bgColor" [style.color]="color" [attr.aria-roledescription]="roleDescription"> | ||
<igx-icon>{{icon}}</igx-icon> | ||
</span> | ||
<igx-icon>{{icon}}</igx-icon> | ||
</ng-template> | ||
|
||
<ng-container *ngTemplateOutlet="template"></ng-container> | ||
<ng-content></ng-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.