BootstrapControl.jsx

54 lines | 1.484 kB Blame History Raw Download

import React from 'react';
import { ButtonToolbar, Button } from 'react-bootstrap'

import BaseControl from '../BaseControl.jsx'

export default class BootstrapControl extends BaseControl {

    constructor(props) {
        super(props, "BootstrapControl");
    }


    //PostTest() {
    //    let test_url = "/Test/Test";
        
    //    fetch(test_url,
    //        {
    //            method: "Post",
    //            headers: {
    //                'Content-Type': 'application/json'
    //            },
    //            body: JSON.stringify({ id: 2, name: "n" })
    //        });
    //}

    ToastifyTest() {

        this.Leght = (this.Leght == undefined ? 0 : this.Leght) + 500;

        //Notification.Sho("Test");
    }

    render() {

        return (
            <div>
                <p>Bootstrap test</p>
                <ButtonToolbar>
                    <Button onClick={this.ToastifyTest} variant="outline-primary">Primary</Button>
                    <Button variant="outline-secondary">Secondary</Button>
                    <Button variant="outline-success">Success</Button>
                    <Button variant="outline-warning">Warning</Button>
                    <Button variant="outline-danger">Danger</Button>
                    <Button variant="outline-info">Info</Button>
                    <Button variant="outline-light">Light</Button>
                    <Button variant="outline-dark">Dark</Button>
                </ButtonToolbar>
            </div>
        );

    }
}