UNPKG

bia-framework

Version:

Bia Framework to work with angular 2

58 lines (44 loc) 1.14 kB
import {OnInit, Component, ViewEncapsulation, Input} from "@angular/core"; /** * Created by jd on 11/02/2016. */ @Component( { selector: 'core-progress', templateUrl: "node_modules/bia-framework/components/core-progress/core-progress.template.html", styleUrls: ['node_modules/bia-framework/components/core-progress/core-progress.css'], encapsulation: ViewEncapsulation.None, } ) export class CoreProgress implements OnInit { @Input('is-enabled') isEnabled:boolean = false; @Input() size:string; isize:string; ngOnInit():any { this.size = this.size || 'sm'; this.formatSize(); return undefined; } private formatSize = ():void => { switch (this.size) { case "sm": this.isize = "32px"; break; case "md": this.isize = "64px"; break; case "lg": this.isize = "128px"; break; } }; constructor() { } }