redhare-demo/components/modals/ConfirmDeleteModal.js

33 lines
980 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import { Button, Modal } from 'components'
export default function ConfirmDeleteModal(props) {
//? Props
const { title, isLoading, isShow, onClose, onCancel, onConfirm } = props
//? Render(s)
return (
<>
<Modal isShow={isShow} onClose={onClose} effect="ease-out">
<Modal.Content onClose={onClose}>
<Modal.Body>
<div className="px-3 py-6 space-y-4 text-center bg-white md:rounded-lg">
<p>
确定删除<span className="font-bold text-red-500">{title}</span>
</p>
<div className="flex justify-center gap-x-20">
<Button onClick={onConfirm} isLoading={isLoading}>
确定
</Button>
<Button className="!bg-green-500" onClick={onCancel}>
取消
</Button>
</div>
</div>
</Modal.Body>
</Modal.Content>
</Modal>
</>
)
}