ant-design/components/popconfirm/demo/basic.tsx
xhh0223 451d2f6ee2
feat(Popconfirm): make title bold and add description prop (#39250)
* feat(popconfirm): make title bold and add description prop

* feat(popconfirm): make title bold and add description prop(update demos)

* feat(popconfirm): make title bold and add description prop(the update of demos translation)

* feat(popconfirm): make title bold and add description prop(the update of snapshot)

* feat(popconfirm): make title bold and add description prop(the update of popconfirm md)

* feat(popconfirm): make title bold and add description prop(the update of popconfirm md)2

* feat(popconfirm): make title bold and add description prop(run all test.ts.snaps and update popconfirm)
2022-12-08 16:39:42 +08:00

28 lines
572 B
TypeScript

import React from 'react';
import { message, Popconfirm } from 'antd';
const confirm = (e: React.MouseEvent<HTMLElement>) => {
console.log(e);
message.success('Click on Yes');
};
const cancel = (e: React.MouseEvent<HTMLElement>) => {
console.log(e);
message.error('Click on No');
};
const App: React.FC = () => (
<Popconfirm
title="Delete the task"
description="Are you sure to delete this task?"
onConfirm={confirm}
onCancel={cancel}
okText="Yes"
cancelText="No"
>
<a href="#">Delete</a>
</Popconfirm>
);
export default App;