🔥 refactor(cardComponent/index.tsx): remove unnecessary dialog component and simplify delete button implementation
This commit is contained in:
parent
dcb8de5335
commit
54f7cfb821
1 changed files with 3 additions and 24 deletions
|
|
@ -47,30 +47,9 @@ export const CardComponent = ({
|
||||||
></span>
|
></span>
|
||||||
<span className="card-component-title-size">{flow.name}</span>
|
<span className="card-component-title-size">{flow.name}</span>
|
||||||
{onDelete && (
|
{onDelete && (
|
||||||
<Dialog>
|
<button className="card-component-delete-button" onClick={onDelete}>
|
||||||
<DialogTrigger asChild>
|
<Trash2 className="card-component-delete-icon" />
|
||||||
<button
|
</button>
|
||||||
className="card-component-delete-button"
|
|
||||||
onClick={onDelete}
|
|
||||||
>
|
|
||||||
<Trash2 className="card-component-delete-icon" />
|
|
||||||
</button>
|
|
||||||
</DialogTrigger>
|
|
||||||
<DialogContent>
|
|
||||||
<DialogHeader>
|
|
||||||
<DialogTitle>Are you sure absolutely sure?</DialogTitle>
|
|
||||||
<DialogDescription>
|
|
||||||
This action cannot be undone. Are you sure you want to
|
|
||||||
permanently delete this file from our servers?
|
|
||||||
</DialogDescription>
|
|
||||||
</DialogHeader>
|
|
||||||
<DialogFooter>
|
|
||||||
<Button type="submit" onClick={onDelete}>
|
|
||||||
Confirm
|
|
||||||
</Button>
|
|
||||||
</DialogFooter>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
)}
|
)}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<CardDescription className="card-component-desc">
|
<CardDescription className="card-component-desc">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue