import React, { useState } from 'react';
import { VtxThemeProvider, VtxRoadModal } 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>
                <VtxRoadModal
                    id="1472108454646890497"
                    title="兖州路(上海路-深圳路)"
                    onCancel={handleCancel}
                    visible={visible}
                />
            </Space>
        </VtxThemeProvider>
    );
};
export default () => <App />;
//# sourceMappingURL=index.jsx.map
