import React, { useState } from 'react'; import { Button, message, Modal, notification, Select, Space, Switch } from 'antd'; const options = [ { label: 'Option 1', value: '1', }, { label: 'Option 2', value: '2', }, ]; const Demo: React.FC = () => { const [messageInstance, messageHolder] = message.useMessage(); const [notificationInstance, notificationHolder] = notification.useNotification(); const [isModalOpen, setIsModalOpen] = useState(false); const onShowStatic = () => { Modal.confirm({ content: setIsModalOpen(false)} maskClosable={false} closable={false} styles={{ content: { marginBlockStart: 250, }, body: { display: 'flex', justifyContent: 'center', }, }} > {messageHolder} {notificationHolder} ); }; export default Demo;