1+ import Alert from "@/assets/icons/alert-triangle.svg?react" ;
12import Trash from "@/assets/icons/trash.svg?react" ;
23import { DeleteAlertContent , DeleteAlertContentBody } from "@/components/DeleteAlertDialog" ;
4+ import { pluralize } from "@/lib/strings" ;
35import { AlertDialog , AlertDialogTrigger , Button } from "@zenml-io/react-component-library" ;
46import { useState } from "react" ;
57import { usePipelineBulkDelete , usePipelineSelectorContext } from "./PipelineSelectorContext" ;
@@ -14,6 +16,9 @@ export function DeletePipelineAlert() {
1416 setIsOpen ( false ) ;
1517 }
1618
19+ const itemName = pluralize ( selectedRowCount , "Pipeline" ) ;
20+ const title = `Delete ${ itemName } ` ;
21+
1722 return (
1823 < AlertDialog open = { isOpen } onOpenChange = { setIsOpen } >
1924 < AlertDialogTrigger asChild >
@@ -27,13 +32,19 @@ export function DeletePipelineAlert() {
2732 Delete
2833 </ Button >
2934 </ AlertDialogTrigger >
30- < DeleteAlertContent
31- title = { `Delete Pipeline${ selectedRowCount >= 2 ? "s" : "" } ` }
32- handleDelete = { handleDelete }
33- >
34- < DeleteAlertContentBody >
35- < p > Are you sure?</ p >
36- < p > This action cannot be undone.</ p >
35+ < DeleteAlertContent title = { title } handleDelete = { handleDelete } >
36+ < DeleteAlertContentBody className = "space-y-1" >
37+ < div >
38+ < p > Are you sure?</ p >
39+ < p > This action cannot be undone.</ p >
40+ </ div >
41+
42+ < div className = "space-y-3 rounded-md border border-warning-300 bg-warning-50 px-2 py-1 text-warning-900" >
43+ < div className = "flex items-center gap-2 text-text-sm" >
44+ < Alert width = { 24 } height = { 24 } className = "shrink-0 fill-warning-700" />
45+ < p > This will also delete all runs and snapshots associated with the { itemName } .</ p >
46+ </ div >
47+ </ div >
3748 </ DeleteAlertContentBody >
3849 </ DeleteAlertContent >
3950 </ AlertDialog >
0 commit comments