import React from 'react'; import { Button, message } from 'antd'; const App: React.FC = () => { const [messageApi, contextHolder] = message.useMessage(); const success = () => { messageApi.open({ type: 'success', content: 'This is a prompt message for success, and it will disappear in 10 seconds', duration: 10, }); }; return ( <> {contextHolder} ); }; export default App;