plane/web/components/web-view/confirm-delete.tsx
Dakshesh Jain 892a30c3a8
fix: web-view action permission, logs, archive issue, and more (#2356)
* fix: web-view

* feat: select module

* dev: select cycle & module

* fix: permissions, logs and archive issue

* fix: logs for issue select

fix: hard-coded web-view validation

* fix: attachment confirm delete workflow

* fix: typo

* fix: logging link instead of redirecting to the link

* fix: made editor height 100%

* style: due-date select

* fix: update comment not working

* fix: changed button text

style: spacing

* fix: due date select not working for today's date

* fix: typography

* fix: spacing in select parent
2023-10-12 12:28:36 +05:30

31 lines
875 B
TypeScript

import { WebViewModal } from "components/web-view";
type DeleteConfirmationProps = {
isOpen: boolean;
title: string;
content: string | React.ReactNode;
onCancel: () => void;
onConfirm: () => void;
};
export const DeleteConfirmation: React.FC<DeleteConfirmationProps> = (props) => {
const { isOpen, onCancel, onConfirm, title, content } = props;
return (
<WebViewModal isOpen={isOpen} onClose={onCancel} modalTitle={title}>
<div className="text-custom-text-200">
<p>{content}</p>
</div>
<div className="mt-4 flex gap-2">
<button
type="button"
onClick={onConfirm}
className="w-full py-2 flex items-center justify-center rounded-[4px] bg-red-500/10 text-red-500 border border-red-500 text-base font-medium"
>
Delete
</button>
</div>
</WebViewModal>
);
};