import './demo1.css';
import Button from '../../button';
import Field from '..';
import Input from '../../input';
import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.field = new Field(this);
    }
    onGetValue() {
        console.log(this.field.getValue('input'));
    }
    render() {
        const { init, setValue, reset } = this.field;
        return (React.createElement("div", { className: "demo" },
            React.createElement(Input, Object.assign({}, init('input', { initValue: 'test' }))),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Button, { type: "primary", onClick: this.onGetValue.bind(this) }, "getValue"),
            React.createElement(Button, { type: "primary", onClick: () => setValue('input', 'set me by click') }, "setValue"),
            React.createElement(Button, { onClick: () => reset() }, "reset")));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('field-demo-1'));
