import { DeletionModalComponent } from './deletion-modal/deletion-modal.component';
import { ErrorPanelComponent } from './error-panel/error-panel.component';
import { HelperComponent } from './helper/helper.component';
+import { InfoPanelComponent } from './info-panel/info-panel.component';
import { LoadingPanelComponent } from './loading-panel/loading-panel.component';
import { ModalComponent } from './modal/modal.component';
import { SparklineComponent } from './sparkline/sparkline.component';
UsageBarComponent,
ErrorPanelComponent,
LoadingPanelComponent,
+ InfoPanelComponent,
ModalComponent,
DeletionModalComponent
],
SubmitButtonComponent,
ErrorPanelComponent,
LoadingPanelComponent,
+ InfoPanelComponent,
UsageBarComponent
],
entryComponents: [
--- /dev/null
+<alert type="info">
+ <table>
+ <tr>
+ <td rowspan="2" class="info-panel-alert-icon">
+ <i class="fa fa-3x fa-info-circle alert-info"
+ aria-hidden="true"></i>
+ </td>
+ <td class="info-panel-alert-title">
+ {{ title }}
+ </td>
+ </tr>
+ <tr>
+ <td class="info-panel-alert-text">
+ <ng-content></ng-content>
+ </td>
+ </tr>
+ </table>
+</alert>
--- /dev/null
+.info-panel-alert-icon {
+ vertical-align: top;
+ padding-right: 15px; // See @alert-padding in bootstrap/less/variables.less
+}
+.info-panel-alert-title {
+ font-weight: bold;
+}
+.info-panel-alert-text {
+}
--- /dev/null
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { AlertModule } from 'ngx-bootstrap';
+
+import { InfoPanelComponent } from './info-panel.component';
+
+describe('InfoPanelComponent', () => {
+ let component: InfoPanelComponent;
+ let fixture: ComponentFixture<InfoPanelComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ InfoPanelComponent ],
+ imports: [ AlertModule.forRoot() ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(InfoPanelComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
--- /dev/null
+import { Component, Input } from '@angular/core';
+
+@Component({
+ selector: 'cd-info-panel',
+ templateUrl: './info-panel.component.html',
+ styleUrls: ['./info-panel.component.scss']
+})
+export class InfoPanelComponent {
+ /**
+ * The title to be displayed. Defaults to 'Information'.
+ * @type {string}
+ */
+ @Input() title = 'Information';
+}