mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
feat(useOverlay): add closeAll method (#3984)
This commit is contained in:
committed by
Benjamin Canac
parent
82b5f322eb
commit
ac4c1946ec
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user