All files / components/tek-card-title card-title.ts

12.5% Statements 2/16
0% Branches 0/2
0% Functions 0/1
12.5% Lines 2/16

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 311x           1x                                                
import { ComponentRender, IComponentRender } from '@zeedhi/common';
import { ICardTitle } from './interfaces';
 
/**
 * CardTitle component join an icon, title, rightSlot and a divider
 */
export class CardTitle extends ComponentRender implements ICardTitle {
  public title: string = '';
 
  public subtitle: string = '';
 
  public iconName: string = '';
 
  public rightSlot: IComponentRender[] = [];
 
  public showDivider: boolean = true;
 
  public to: string = '';
 
  public constructor(props: ICardTitle) {
    super(props);
    this.title = this.getInitValue('title', props.title, this.title);
    this.subtitle = this.getInitValue('subtitle', props.subtitle, this.subtitle);
    this.iconName = this.getInitValue('iconName', props.iconName, this.iconName);
    this.rightSlot = props.rightSlot || this.rightSlot;
    this.showDivider = this.getInitValue('showDivider', props.showDivider, this.showDivider);
    this.to = this.getInitValue('to', props.to, this.to);
    this.createAccessors();
  }
}