-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(demo): improve documentation page
/notification
- Loading branch information
1 parent
c01019d
commit 89ab26e
Showing
8 changed files
with
47 additions
and
14 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
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
18 changes: 17 additions & 1 deletion
18
apps/demo/src/app/pages/notification/examples/01-getting-permission/index.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 +1,17 @@ | ||
<button tuiButton (click)="requestPermission()">Request permission</button> | ||
<ng-container [ngSwitch]="notificationPermissionState$ | async"> | ||
<tui-badge | ||
*ngSwitchCase="'granted'" | ||
status="success" | ||
value="Permission is granted" | ||
></tui-badge> | ||
|
||
<tui-badge | ||
*ngSwitchCase="'denied'" | ||
status="error" | ||
value="Permission is denied" | ||
></tui-badge> | ||
|
||
<button *ngSwitchDefault tuiButton (click)="requestPermission()"> | ||
Request permission | ||
</button> | ||
</ng-container> |
11 changes: 9 additions & 2 deletions
11
apps/demo/src/app/pages/notification/examples/01-getting-permission/index.ts
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
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