import React, { useState } from 'react';
import { VtxFacilityModal, VtxThemeProvider } from '@vtx/modals';
import { Button, Space } from 'antd';

const App = () => {
    const [visible, setVisible] = useState(false);
    const [theme, setTheme] = useState('light');
    const showModal = theme => {
        setVisible(true);
        setTheme(theme);
    };
    const handleCancel = () => {
        setVisible(false);
    };
    return (
        <VtxThemeProvider value={{ theme }}>
            <Space>
                <Button type="primary" onClick={() => showModal('light')}>
                    基本模态框
                </Button>
                <Button type="primary" onClick={() => showModal('dark')}>
                    深色的建筑模态框
                </Button>
                <VtxFacilityModal
                    id="1550324571566493697"
                    title="基础设施名称"
                    subTitle=""
                    onCancel={handleCancel}
                    visible={visible}
                    width={1520}
                />
            </Space>
        </VtxThemeProvider>
    );
};
export default () => <App />;
//# sourceMappingURL=index.jsx.map
