import React, { useState } from 'react';
import Button from 'components/button';
import Modal from 'components/modal';
import Input from 'components/input';

type IProps = {};
const Demo = function(props: IProps) {
    const [visible, setV] = useState(false);
    return (
        <div>
            <Button onClick={() => setV(true)}>打开</Button>
            <Modal title="我是标题" visible={visible} onOk={() => setV(false)} onCancel={() => setV(false)}>
                <Input placeholder="请输入" style={{ marginRight: 10 }} />
                <Button>我是一个按钮</Button>
            </Modal>
        </div>
    );
};
Demo.defaultProps = {};
export default Demo;
