@Output()
backAction = new EventEmitter();
@Input()
- type: 'warning' | 'error' | 'info' | 'success';
+ type: 'warning' | 'error' | 'info' | 'success' | 'danger';
@Input()
typeIcon: Icons | string;
@Input()
showIcon = true;
@Input()
showTitle = true;
+ @Input()
+ dismissible = false;
+
+ /**
+ * The event that is triggered when the close button (x) has been
+ * pressed.
+ */
+ @Output()
+ dismissed = new EventEmitter();
icons = Icons;
this.typeIcon = this.typeIcon || Icons.check;
this.bootstrapClass = this.bootstrapClass || 'success';
break;
+ case 'danger':
+ this.title = this.title || this.i18n(`Danger`);
+ this.typeIcon = this.typeIcon || Icons.warning;
+ this.bootstrapClass = this.bootstrapClass || 'danger';
+ break;
}
}
+
+ onClose(): void {
+ this.dismissed.emit();
+ }
}