style: add a better loader color display
This commit is contained in:
@ -19,12 +19,16 @@ import {MatIconButton} from "@angular/material/button";
|
||||
export class NotificationComponent {
|
||||
showProgressBar: boolean = false;
|
||||
progress: number = 100;
|
||||
color: string = "primary";
|
||||
|
||||
constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any, private snackBarRef: MatSnackBarRef<NotificationComponent>) {
|
||||
if (data.duration) {
|
||||
this.startProgress(data.duration);
|
||||
this.showProgressBar = true;
|
||||
}
|
||||
if (data.color) {
|
||||
this.color = data.color;
|
||||
}
|
||||
}
|
||||
|
||||
dismiss(): void {
|
||||
|
Reference in New Issue
Block a user