-
Notifications
You must be signed in to change notification settings - Fork 30
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 #218 from italia/145-add-docs-and-tests-for-compon…
…ent-notification chore(docs): added docs for the notifications component
- Loading branch information
Showing
26 changed files
with
643 additions
and
48 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
11 changes: 6 additions & 5 deletions
11
...cts/design-angular-kit/src/lib/components/core/notifications/notifications.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,18 +1,19 @@ | ||
<div *ngFor="let notification of notifications; let i = index" | ||
<div *ngFor="let notification of notifications" | ||
[id]="notification.id" | ||
class="notification {{notification.position}} {{notification.type}}" | ||
[class.with-icon]="notification.type !== NotificationType.Standard" | ||
[class.dismissable]="notification.dismissable" | ||
[class.with-icon]="!!notification.icon" | ||
[class.dismissable]="notification.dismissible" | ||
role="alert" [attr.aria-labelledby]="notification.id+'-title'"> | ||
|
||
<h2 [id]="notification.id+'-title'" class="h5"> | ||
<it-icon *ngIf="!!notification.icon" [name]="notification.icon"></it-icon> | ||
<ng-container>{{notification.title}}</ng-container> | ||
</h2> | ||
<p *ngIf="notification.message">{{notification.message}}</p> | ||
|
||
<button *ngIf="notification.dismissable" type="button" class="btn notification-close" | ||
<button *ngIf="notification.dismissible" type="button" class="btn notification-close" | ||
(click)="hideNotification(notification.id)"> | ||
<it-icon name="close"></it-icon> | ||
<span class="visually-hidden">{{'it.core.close-notification'|translate:{title: notification.title} }}</span> | ||
<span class="visually-hidden">{{'it.core.close-notification'|translate:{ title: notification.title } }}</span> | ||
</button> | ||
</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
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
22 changes: 22 additions & 0 deletions
22
src/app/notifications/notifications-example-type/notifications-example-type.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<h3>Tipi di notifica</h3> | ||
|
||
<div class="bd-example"> | ||
<div class="d-flex mb-2"> | ||
<button class="btn-me" itButton size="sm" (click)="standardNotification()"> | ||
Notifica Standard | ||
</button> | ||
<button class="btn-me" itButton="success" size="sm" (click)="successNotification()"> | ||
Notifica Successo | ||
</button> | ||
<button class="btn-me" itButton="danger" size="sm" (click)="errorNotification()"> | ||
Notifica Errore | ||
</button> | ||
<button class="btn-me" itButton="warning" size="sm" (click)="warningNotification()"> | ||
Notifica Precauzione | ||
</button> | ||
<button class="btn-me" itButton="info" size="sm" (click)="infoNotification()"> | ||
Notifica Info | ||
</button> | ||
</div> | ||
</div> | ||
|
Oops, something went wrong.
4f87263
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
design-angular-kit – ./
design-angular-kit.vercel.app
design-angular-kit-dip-trasformazione-digitale.vercel.app
design-angular-kit-git-main-dip-trasformazione-digitale.vercel.app