Button

less than 1 minute read

References

TypeScript

import { Components } from "gd-sprest-bs";

React

import * as React from "react";
import { Button } from "gd-sprest-bsx";

export class IDemo extends React.Component {
    // Render the component
    render() {
        return (
            <Button
                text="Demo"
                onClick={(btn, ev) => {
                    alert("The " + btn.text + " button was clicked.");
                }}
            />
        );
    }
}

VueJS

<template>
    <Button text="Demo" v-bind:on-click="showAlert" />
</template>

<script>
import { Button } from "gd-sprest-bs-vue";
export default {
    components: { Button },
    methods: {
        showAlert(btn, ev) {
            alert("The " + btn.text + " button was clicked.");
        }
    }
}
</script>

Code Playground