128.2. Creating notification module - modified default config (#16)

This commit is contained in:
Art
2021-09-17 13:55:26 +03:00
parent 174326ab3e
commit 490f56116c

View File

@ -1,10 +1,52 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {NotifierModule, NotifierOptions} from "angular-notifier";
const notifierCustomOptions: NotifierOptions = {
position: {
horizontal: {
position: 'left',
distance: 150,
},
vertical: {
position: 'bottom',
distance: 12,
gap: 10,
},
},
theme: 'material',
behaviour: {
autoHide: 5000,
onClick: 'hide',
onMouseover: 'pauseAutoHide',
showDismissButton: true,
stacking: 4,
},
animations: {
enabled: true,
show: {
preset: 'slide',
speed: 300,
easing: 'ease',
},
hide: {
preset: 'fade',
speed: 300,
easing: 'ease',
offset: 50,
},
shift: {
speed: 300,
easing: 'ease',
},
overlap: 150,
},
};
@NgModule({
declarations: [],
imports: [
CommonModule
]
NotifierModule.withConfig(notifierCustomOptions)
],
exports: [NotifierModule]
})
export class NotificationModule { }
export class NotificationModule {
}