File

src/app/shared/components/info-panel/info-panel.component.ts

Metadata

selector cd-info-panel
styleUrls ./info-panel.component.scss
templateUrl ./info-panel.component.html

Index

Inputs

Constructor

constructor(i18n: I18n)
Parameters :
Name Type Optional
i18n I18n No

Inputs

title
Default value : this.i18n('Information')

The title to be displayed. Defaults to 'Information'.

import { Component, Input } from '@angular/core';

import { I18n } from '@ngx-translate/i18n-polyfill';

@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 = this.i18n('Information');

  constructor(private i18n: I18n) {}
}
<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>

./info-panel.component.scss

.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;
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""