Skip to content

getClosedModals

Reactive
ts
function getClosedModals(): string[];

Returns an array of all modal keys with status "closed".

Example

ts
import {
    createModal,
    withModalStatus,
    getClosedModals,
} from "@monstermann/signals-modal";

createModal("modal1", () => {
    withModalStatus();
});

createModal("modal2", () => {
    withModalStatus();
});

getClosedModals(); // ["modal1", "modal2"]