2 year anniversary

Buttons


PageHome.ts

//Button example include style,icon and events
import V = require(“VCL/VCL”);
 
export class PageHome extends V.TPage {
    constructor() {
        super();
        
        //simple bootstrap styled button
        var btn1 = new V.TButton(this,”bt1″, “Primary Large”);
        btn1.ButtonSize = V.ButtonSize.Large;
        btn1.ButtonStyle = V.ButtonStyle.Primary;
 
        //button with icon
        var btn2 = new V.TButton(this, “bt2”, “Calendar”);
        btn2.ButtonStyle = V.ButtonStyle.Success;
        btn2.ButtonIcon = V.ButtonIcon.icon_calendar;
        btn2.IconAlignment = V.IconAlignment.Right;
 
        //Event
        btn2 = new V.TButton(this, “bt3”, “Event”);
        btn2.onClicked = () => {
            btn1.Text = “Fade out”;
            btn1.fadeOut(2000);
        }
    }
}

PageHome.html

<div>
 <div>
     <div id=”bt1″/>
     <div id=”bt2″/>
      <div id=”bt3″/>
    </div>
</div>

 

This entry was posted in Uncategorized and tagged . Bookmark the permalink.