All files state.component.ts

100% Statements 10/10
100% Branches 0/0
100% Functions 2/2
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32  1x                   1x   1x     1x     1x       1x 4x           1x  
import { NgxMaterialWindowState } from './state.model';
import { Component, Input, OnInit } from '@angular/core';
 
@Component({
  selector: 'ngx-md-window-state',
  template: `
    <div *ngIf="state.isActive">
      <ng-content></ng-content>
    </div>
  `
})
export class NgxMaterialStateComponent implements OnInit {
  @Input()
  linkName: string;
 
  @Input()
  stateName: string;
 
  @Input()
  icon?: string;
 
  state: NgxMaterialWindowState;
 
  ngOnInit() {
    this.state = {
      name: this.stateName,
      linkName: this.linkName,
      icon: this.icon
    }
  }
}