UNPKG

@cn-ui/core

Version:

The @cn-ui/core is a collection of UI components and utilities for building modern web applications with SolidJS.

16 lines (14 loc) 419 B
import { createBlackBoard } from "@cn-ui/reactive"; import type { DialogExpose } from "../dialog"; export const GlobalDialog = (() => { const item = createBlackBoard<Record<string, DialogExpose>>({ allowSameRegister: false, autoCleanUp: true, }); return { ...item, toggle(id: string, val?: boolean) { return item.getApp(id)?.toggle(val); }, }; })();