import React, { useState } from 'react';
import { VtxThemeProvider, VtxVehicleModal } 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>
                <VtxVehicleModal
                    id="4ab3202192694a3589856d64511d4d40"
                    title="鲁L66153"
                    subTitle="机扫车"
                    carType="jxh"
                    onCancel={handleCancel}
                    visible={visible}
                />
            </Space>
        </VtxThemeProvider>
    );
};
export default () => <App />;
//# sourceMappingURL=index.jsx.map
