-<div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">
- <i class="fa fa-exclamation-triangle fa-fw icon-danger"
- aria-hidden="true"></i> {{ title }}
- </h3>
- </div>
- <div class="panel-body">
- <ng-content></ng-content>
- </div>
- <div class="panel-footer"
- *ngIf="backAction.observers.length > 0">
- <div class="button-group text-right">
- <button class="btn btn-sm btn-default tc_backButton"
- type="button"
- (click)="backAction.emit()"
- autofocus
- i18n>
- Back
- </button>
- </div>
- </div>
+<alert type="danger">
+ <strong>
+ <i class="fa fa-exclamation-triangle fa-fw icon-danger"
+ aria-hidden="true"></i> {{ title }}
+ </strong>
+ <ng-content></ng-content>
+</alert>
+
+<div class="button-group text-right"
+ *ngIf="backAction.observers.length > 0">
+ <button class="btn btn-sm btn-default tc_backButton"
+ type="button"
+ (click)="backAction.emit()"
+ autofocus
+ i18n>
+ Back
+ </button>
</div>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { AlertModule } from 'ngx-bootstrap';
+
import { ErrorPanelComponent } from './error-panel.component';
describe('ErrorPanelComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ ErrorPanelComponent ]
+ declarations: [ ErrorPanelComponent ],
+ imports: [ AlertModule.forRoot() ]
})
.compileComponents();
}));
export class ErrorPanelComponent {
/**
- * The title to be displayed. Defaults to 'Error'.
+ * The title to be displayed. Defaults to 'Error!'.
* @type {string}
*/
- @Input() title = 'Error';
+ @Input() title = 'Error!';
/**
* The event that is triggered when the 'Back' button is pressed.