@cwncollab-org/mui-component-kit 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
@@ -502,12 +502,12 @@ function MyComponent() {
|
|
502
502
|
const confirm = useConfirmDialog()
|
503
503
|
|
504
504
|
const handleClick = async () => {
|
505
|
-
const
|
505
|
+
const { success } = await confirm({
|
506
506
|
title: 'Confirm',
|
507
507
|
message: 'Are you sure you want to add this item to cart?',
|
508
508
|
})
|
509
509
|
|
510
|
-
if (
|
510
|
+
if (success) {
|
511
511
|
// Proceed
|
512
512
|
}
|
513
513
|
}
|
@@ -529,12 +529,12 @@ function MyComponent() {
|
|
529
529
|
const confirmDelete = useConfirmDeleteDialog()
|
530
530
|
|
531
531
|
const handleDelete = async () => {
|
532
|
-
const
|
532
|
+
const { success } = await confirmDelete({
|
533
533
|
title: 'Delete Item',
|
534
534
|
message: 'Are you sure you want to delete this item? This action cannot be undone.',
|
535
535
|
})
|
536
536
|
|
537
|
-
if (
|
537
|
+
if (success) {
|
538
538
|
// Proceed with deletion
|
539
539
|
}
|
540
540
|
}
|