UNPKG

bia-framework

Version:

Bia Framework to work with angular 2

36 lines (32 loc) 863 B
/** * Created by jackes on 10/01/2016. */ import {Component, ViewEncapsulation, Input} from '@angular/core'; import {NgClass} from '@angular/common'; @Component( { selector: 'badge', template: ` <span class="core-badge bg-color-{{color}} core-badge-pos-{{position}}" [ngClass]="{'isVisible':isVisible}">{{count}}</span> `, styleUrls: ['node_modules/bia-framework/components/badge/badge.css'], directives: [NgClass], encapsulation: ViewEncapsulation.None } ) export class Badge { @Input() color:string; @Input() isVisible:boolean; @Input() count:number; @Input() position:string; constructor() { this.color = "danger"; this.isVisible = false; this.count = 0; this.position = "right"; } }