import Form from '..';
import Input from '../../input';
import React from 'react';
import ReactDOM from 'react-dom';
const FormItem = Form.Item;
class Demo extends React.Component {
    onSubmit(e) {
        e.preventDefault(); // form will auto submit if remove this line
        console.log('onsubmit');
    }
    render() {
        return (React.createElement(Form, { onSubmit: this.onSubmit.bind(this) },
            React.createElement(FormItem, null,
                React.createElement(Input, { placeholder: "Enter Key can also trigger \u2018onSubmit\u2019" })),
            React.createElement(Form.Submit, { htmlType: "submit" }, "submit")));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('form-demo-7'));
