mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 00:09:39 +08:00
18 lines
432 B
TypeScript
18 lines
432 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;
|