Skip to content

getModalsForGroup

Reactive
ts
function getModalsForGroup(group: string): ReadonlySet<string>;

Returns all keys the given group belongs to.

Example

ts
import {
    createModal,
    withModalGroups,
    modalGroups,
    getModalsForGroup,
} from "@monstermann/signals-modal";

createModal("key", () => {
    withModalGroups([modalGroups.dialog]);
});

getModalsForGroup(modalGroups.dialog); // Set(["key"])