index.tsx
569 Bytes
import { Button, Popconfirm } from 'antd';
const ButtonConfirm = ({
title,
description,
text,
className,
onConfirm,
}: {
title: string;
text: string;
description?: string;
className?: string;
onConfirm?: () => void;
}) => {
return (
<Popconfirm
placement="topLeft"
title={title}
description={description}
onConfirm={onConfirm}
okText="确认"
cancelText="取消"
>
<Button type="link" className={className}>
{text}
</Button>
</Popconfirm>
);
};
export default ButtonConfirm;