0.0.3 • Published 5 years ago
@ng4746/notice v0.0.3
Install from npm:
npm install @ng4746/notice --save
Add needed package to NgModule imports:
import { NoticeModule } from '@ng4746/notice';
@NgModule({
...
imports: [
NoticeModule.withConfig({
global: {
newOnTop: true,
maxAtPosition: 6,
maxOnScreen: 8,
filterDuplicates: false
},
toast: {
type: 'info'
}}
)
...
]
...
})
Add app.component.html:
<notice-section class="material"></notice-section>
Add styles.scss:
.material {
@import "~@ng4746/notice/styles/material";
}
.simple {
@import "~@ng4746/notice/styles/simple";
}
.dark {
@import "~@ng4746/notice/styles/dark";
}
.snotify-icon {
object-fit: cover;
width: 100%;
height: 100%;
object-position: center;
}
Credit
Inspired by ng-snotify.