import React, { useState } from 'react';
import { VtxThemeProvider, VtxCommunityModal } 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>
                <VtxCommunityModal
                    id="1550324571268698114"
                    onCancel={handleCancel}
                    visible={visible}
                />
            </Space>
        </VtxThemeProvider>
    );
};
export default () => <App />;
//# sourceMappingURL=index.jsx.map
