feat(useOverlay): add isOpen method to check overlay state (#4041)

This commit is contained in:
Eugen Istoc
2025-05-01 12:48:41 -04:00
committed by GitHub
parent c5bdec0f64
commit a4f3f6d531
4 changed files with 21 additions and 3 deletions

View File

@@ -13,7 +13,9 @@ const modal = overlay.create(LazyModalExample, {
})
async function open() {
const shouldIncrement = await modal.open()
const instance = modal.open()
const shouldIncrement = await instance.result
if (shouldIncrement) {
count.value++

View File

@@ -13,7 +13,9 @@ const slideover = overlay.create(LazySlideoverExample, {
})
async function open() {
const shouldIncrement = await slideover.open()
const instance = slideover.open()
const shouldIncrement = await instance.result
if (shouldIncrement) {
count.value++