import Input from '..';
import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            maxLength: 10,
            control: 'maxLen control',
        };
    }
    onChange(v) {
        console.log(v);
        this.setState({
            control: v,
        });
    }
    onKeyDown(e, opts) {
        console.log('onKeyDown', opts);
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(Input, { maxLength: 10, size: "large", placeholder: "Large", value: this.state.control, showLimitHint: true, "aria-label": "input max length 10", onChange: this.onChange.bind(this), onKeyDown: this.onKeyDown.bind(this) }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Input, { maxLength: 20, placeholder: "medium", showLimitHint: true, cutString: false, "aria-label": "input max length 20", onChange: v => {
                    this.setState({ control: v });
                    console.log(v);
                }, onKeyDown: (e, opts) => {
                    console.log('onKeyDown', opts);
                } }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Input, { showLimitHint: true, size: "small", placeholder: "small", maxLength: 100, "aria-label": "input max length 100" }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Input.TextArea, { placeholder: "TextArea", maxLength: 100, rows: 4, showLimitHint: true, "aria-label": "input max length 100" }),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Input, { maxLength: 5, placeholder: "Original maxLength", "aria-label": "input max length 5" })));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('input-demo-6'));
