mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 23:35:38 +08:00
18 lines
434 B
TypeScript
18 lines
434 B
TypeScript
import React from 'react';
|
|
import { Button, Popconfirm } from 'antd';
|
|
|
|
const App: React.FC = () => {
|
|
const confirm = () =>
|
|
new Promise((resolve) => {
|
|
setTimeout(() => resolve(null), 3000);
|
|
});
|
|
|
|
return (
|
|
<Popconfirm title="Title" onConfirm={confirm} onOpenChange={() => console.log('open change')}>
|
|
<Button type="primary">Open Popconfirm with Promise</Button>
|
|
</Popconfirm>
|
|
);
|
|
};
|
|
|
|
export default App;
|