128.2. Creating notification module - modified default config (#16)
This commit is contained in:
@ -1,10 +1,52 @@
|
|||||||
import {NgModule} from '@angular/core';
|
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({
|
@NgModule({
|
||||||
declarations: [],
|
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule
|
NotifierModule.withConfig(notifierCustomOptions)
|
||||||
]
|
],
|
||||||
|
exports: [NotifierModule]
|
||||||
})
|
})
|
||||||
export class NotificationModule { }
|
export class NotificationModule {
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user