mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
docs(modal/slideover): improve programmatic examples (#4556)
Co-authored-by: Eugen Istoc <eugenistoc@gmail.com>
This commit is contained in:
@@ -6,14 +6,12 @@ const count = ref(0)
|
||||
const toast = useToast()
|
||||
const overlay = useOverlay()
|
||||
|
||||
const modal = overlay.create(LazyModalExample, {
|
||||
props: {
|
||||
count: count.value
|
||||
}
|
||||
})
|
||||
const modal = overlay.create(LazyModalExample)
|
||||
|
||||
async function open() {
|
||||
const instance = modal.open()
|
||||
const instance = modal.open({
|
||||
count: count.value
|
||||
})
|
||||
|
||||
const shouldIncrement = await instance.result
|
||||
|
||||
|
||||
@@ -6,14 +6,12 @@ const count = ref(0)
|
||||
const toast = useToast()
|
||||
const overlay = useOverlay()
|
||||
|
||||
const slideover = overlay.create(LazySlideoverExample, {
|
||||
props: {
|
||||
count: count.value
|
||||
}
|
||||
})
|
||||
const slideover = overlay.create(LazySlideoverExample)
|
||||
|
||||
async function open() {
|
||||
const instance = slideover.open()
|
||||
const instance = slideover.open({
|
||||
count: count.value
|
||||
})
|
||||
|
||||
const shouldIncrement = await instance.result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user