File

src/app/pages/dashboard/status-card/status-card.component.ts

Metadata

selector ngx-status-card
styleUrls status-card.component.scss
template
<nb-card (click)="on = !on" [ngClass]="{'off': !on}">
  <div class="icon-container">
    <div class="icon {{ type }}">
      <ng-content></ng-content>
    </div>
  </div>

  <div class="details">
    <div class="title">{{ title }}</div>
    <div class="status">{{ on ? 'ON' : 'OFF' }}</div>
  </div>
</nb-card>

Index

Inputs

Inputs

on

Default value: true

title

Type: string

type

Type: string

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

@Component({
  selector: 'ngx-status-card',
  styleUrls: ['./status-card.component.scss'],
  template: `
    <nb-card (click)="on = !on" [ngClass]="{'off': !on}">
      <div class="icon-container">
        <div class="icon {{ type }}">
          <ng-content></ng-content>
        </div>
      </div>

      <div class="details">
        <div class="title">{{ title }}</div>
        <div class="status">{{ on ? 'ON' : 'OFF' }}</div>
      </div>
    </nb-card>
  `,
})
export class StatusCardComponent {

  @Input() title: string;
  @Input() type: string;
  @Input() on = true;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""