-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dashboard): Add workflow page action menu (#7222)
- Loading branch information
Showing
5 changed files
with
165 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { WorkflowListResponseDto, WorkflowResponseDto } from '@novu/shared'; | ||
import { ConfirmationModal } from './confirmation-modal'; | ||
import TruncatedText from './truncated-text'; | ||
|
||
type DeleteWorkflowDialogProps = { | ||
workflow: WorkflowResponseDto | WorkflowListResponseDto; | ||
open: boolean; | ||
onOpenChange: (open: boolean) => void; | ||
onConfirm: () => void; | ||
isLoading?: boolean; | ||
}; | ||
|
||
export const DeleteWorkflowDialog = ({ | ||
workflow, | ||
open, | ||
onOpenChange, | ||
onConfirm, | ||
isLoading, | ||
}: DeleteWorkflowDialogProps) => { | ||
return ( | ||
<ConfirmationModal | ||
open={open} | ||
onOpenChange={onOpenChange} | ||
onConfirm={onConfirm} | ||
title="Are you sure?" | ||
description={ | ||
<> | ||
You're about to delete the <TruncatedText className="max-w-[32ch] font-bold">{workflow.name}</TruncatedText>{' '} | ||
workflow, this action is permanent. <br /> | ||
<br /> | ||
You won't be able to trigger this workflow anymore. | ||
</> | ||
} | ||
confirmButtonText="Delete" | ||
isLoading={isLoading} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters