import React from 'react';
import { Modal, Form, Input } from 'antd';
import { connectAlita } from 'redux-alita';
import * as PropTypes from 'prop-types'

class SystemPropertiesForm extends React.Component {


    static defaultProps = {
        visible: false,
        config:{},
        onHide:()=>{}
    };

    static propTypes={
        visible:PropTypes.bool,
        config:PropTypes.object,
        onHide:PropTypes.func
    };

    render() {
        const { getFieldDecorator } = this.props.form;
        let {config,visible,onHide} = this.props;
        return (<Modal  title={config.id?'编辑配置':'添加配置'} visible={visible} onCancel={onHide}>
            <Form>
                <Form.Item>
                    {getFieldDecorator('title')(<Input/>)}
                </Form.Item>
            </Form>
        </Modal>);


    }

}

export default connectAlita([])(Form.create()(SystemPropertiesForm));
