Button

Documentation

Input Parameters

Name Type Description
className string The class name to apply to the main element.
disable boolean True to disable the button.
el HTMLElement The element to render the button to.
href string The button url.
onClick (btn?: HTMLButtonElement) The button click event.
text string The button text.

JavaScript

var $REST = require("gd-sprest-js");

// Create the button
var el = document.querySelector("#myButton");
$REST.JS.Fabric.Button({
    el: el,
    text: "My Button",
    onClick: function() {
        // Code goes here
    }
});

TypeScript

import { Fabric } from "gd-sprest-js";

// Create the button
let el = document.querySelector("#myButton");
Fabric.Button({
    el,
    text: "My Button",
    onClick: () => {
        // Code goes here
    }
});