-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(notification): allow configuration of default options (#636)
* feat(notification-alert): allow configuration of default options * fix(core): implement review notes * fix(core): move notification interfaces, add autoClose type * feat(notification-alert): allow configuration of default options * fix(core): implement review notes * fix(core): move notification interfaces, add autoClose type * chore: resolve conflicts * chore: fix build Co-authored-by: Dima Karimov <[email protected]> Co-authored-by: Vladimir <[email protected]>
- Loading branch information
1 parent
1aa6b16
commit d89e523
Showing
34 changed files
with
673 additions
and
98 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {TuiContextWithImplicit} from '@taiga-ui/cdk'; | ||
import {TuiNotification} from '@taiga-ui/core/enums'; | ||
import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus'; | ||
|
||
export type TuiNotificationAutoClose = | ||
| boolean | ||
| number | ||
| ((status: TuiNotification) => number | boolean); | ||
|
||
export interface TuiNotificationOptions { | ||
readonly label?: PolymorpheusContent<TuiContextWithImplicit<TuiNotification>>; | ||
readonly status?: TuiNotification; | ||
readonly hasIcon?: boolean; | ||
readonly autoClose?: TuiNotificationAutoClose; | ||
readonly hasCloseButton?: boolean; | ||
} | ||
|
||
export interface TuiNotificationOptionsWithData<I> extends TuiNotificationOptions { | ||
readonly data: I; | ||
} |
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
50 changes: 19 additions & 31 deletions
50
projects/core/modules/notifications/notification-alert/Notification-alert.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
24 changes: 14 additions & 10 deletions
24
projects/core/modules/notifications/notification-alert/notification-alert.template.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
Oops, something went wrong.