bia-framework
Version:
Bia Framework to work with angular 2
71 lines (59 loc) • 1.72 kB
text/typescript
/**
* Created by jd on 10/02/2016.
*/
import {NgIf} from "@angular/common";
import {Component, Input, Output, EventEmitter, OnInit, ViewEncapsulation} from "@angular/core";
import {RippleEffect} from "../ripple-effect/RippleEffect";
import {CoreIcon} from "../core-icon/core-icon";
export class CoreButton implements OnInit
{
//If is a normal button or submit button
clickBehavior:string;
//Text of the Button
text:string;
//Type of odisseia button, flat, raised, float or icon
type:string;
//Applicable if float. Position, float left, right bottom or top
float:string;
//Color of the button
color:string;
//Control if the button is Disabled
isDisabled:boolean;
icon:string;
iconColor:string;
//Click command of the Button
iconPlace:string;
commmand = new EventEmitter();
constructor()
{
}
ngOnInit():any
{
this.clickBehavior = this.clickBehavior || "normal";
this.iconPlace = this.iconPlace || "rows";
this.type = this.type || "flat";
}
public onButtonClick = (event:Event):void =>
{
this.commmand.emit(event);
}
}