diff --git a/docs/app/components/content/examples/modal/ModalExample.vue b/docs/app/components/content/examples/modal/ModalExample.vue
index bc2256f9..a409d417 100644
--- a/docs/app/components/content/examples/modal/ModalExample.vue
+++ b/docs/app/components/content/examples/modal/ModalExample.vue
@@ -4,12 +4,21 @@ const modal = useModal()
defineProps<{
count: number
}>()
+
+const emit = defineEmits(['success'])
+
+function onSuccess() {
+ emit('success')
+}
-
+
+
+
+
diff --git a/docs/app/components/content/examples/modal/ModalProgrammaticExample.vue b/docs/app/components/content/examples/modal/ModalProgrammaticExample.vue
index 7aca29b4..4b42d4eb 100644
--- a/docs/app/components/content/examples/modal/ModalProgrammaticExample.vue
+++ b/docs/app/components/content/examples/modal/ModalProgrammaticExample.vue
@@ -3,6 +3,7 @@ import { LazyModalExample } from '#components'
const count = ref(0)
+const toast = useToast()
const modal = useModal()
function open() {
@@ -10,7 +11,13 @@ function open() {
modal.open(LazyModalExample, {
description: 'And you can even provide a description!',
- count: count.value
+ count: count.value,
+ onSuccess() {
+ toast.add({
+ title: 'Success !',
+ id: 'modal-success'
+ })
+ }
})
}
diff --git a/docs/app/components/content/examples/slideover/SlideoverExample.vue b/docs/app/components/content/examples/slideover/SlideoverExample.vue
index 0c298949..3f43968e 100644
--- a/docs/app/components/content/examples/slideover/SlideoverExample.vue
+++ b/docs/app/components/content/examples/slideover/SlideoverExample.vue
@@ -4,6 +4,12 @@ const slideover = useSlideover()
defineProps<{
count: number
}>()
+
+const emit = defineEmits(['success'])
+
+function onSuccess() {
+ emit('success')
+}
@@ -13,7 +19,10 @@ defineProps<{
-
+
+
+
+
diff --git a/docs/app/components/content/examples/slideover/SlideoverProgrammaticExample.vue b/docs/app/components/content/examples/slideover/SlideoverProgrammaticExample.vue
index 4c681d68..f68d3385 100644
--- a/docs/app/components/content/examples/slideover/SlideoverProgrammaticExample.vue
+++ b/docs/app/components/content/examples/slideover/SlideoverProgrammaticExample.vue
@@ -3,6 +3,7 @@ import { LazySlideoverExample } from '#components'
const count = ref(0)
+const toast = useToast()
const slideover = useSlideover()
function open() {
@@ -10,7 +11,13 @@ function open() {
slideover.open(LazySlideoverExample, {
title: 'Slideover',
- count: count.value
+ count: count.value,
+ onSuccess() {
+ toast.add({
+ title: 'Success !',
+ id: 'modal-success'
+ })
+ }
})
}