-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add property description and noRadius
- Loading branch information
1 parent
38d8fb8
commit 947366b
Showing
4 changed files
with
83 additions
and
21 deletions.
There are no files selected for viewing
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,27 +1,40 @@ | ||
<div | ||
data-testid="ion-alert" | ||
[class]="'ion-alert ' + type + ' closable-' + closable" | ||
[ngClass]="{ 'without-background': hideBackground }" | ||
[ngClass]="{ | ||
'without-background': hideBackground, | ||
'with-description': description, | ||
'no-radius': noRadius | ||
}" | ||
#ionAlert | ||
> | ||
<ion-icon | ||
data-testid="status-icon" | ||
class="alert-icon" | ||
[type]="iconType" | ||
></ion-icon> | ||
<span *ngIf="hasPlainText; else customBody" data-testid="ion-alert-message">{{ | ||
message | ||
}}</span> | ||
<div class="header"> | ||
<div class="message"> | ||
<ion-icon | ||
data-testid="status-icon" | ||
class="alert-icon" | ||
[type]="iconType" | ||
></ion-icon> | ||
|
||
<ng-template #customBody> | ||
<ng-container [ngTemplateOutlet]="message"></ng-container> | ||
</ng-template> | ||
<span | ||
*ngIf="hasPlainText; else customBody" | ||
data-testid="ion-alert-message" | ||
>{{ message }}</span | ||
> | ||
|
||
<ion-icon | ||
class="close-icon" | ||
data-testid="close-icon" | ||
type="close" | ||
*ngIf="closable" | ||
(click)="closeEvent()" | ||
></ion-icon> | ||
<ng-template #customBody> | ||
<ng-container [ngTemplateOutlet]="message"></ng-container> | ||
</ng-template> | ||
</div> | ||
|
||
<ion-icon | ||
class="close-icon" | ||
data-testid="close-icon" | ||
type="close" | ||
*ngIf="closable" | ||
(click)="closeEvent()" | ||
></ion-icon> | ||
</div> | ||
|
||
<div *ngIf="description" class="description">{{ description }}</div> | ||
</div> |
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
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
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