feat(useOverlay): add closeAll method (#3984)

This commit is contained in:
Eugen Istoc
2025-04-25 09:04:03 -04:00
committed by Benjamin Canac
parent 82b5f322eb
commit ac4c1946ec

View File

@@ -88,6 +88,10 @@ function _useOverlay() {
}
}
const closeAll = (): void => {
overlays.forEach(overlay => close(overlay.id))
}
const unMount = (id: symbol): void => {
const overlay = getOverlay(id)
@@ -121,6 +125,7 @@ function _useOverlay() {
overlays,
open,
close,
closeAll,
create,
patch,
unMount