Type Alias UIUtilModal

UIUtilModal: {
    create: (id: string, options: PopUpOptions) => PopUp;
    getCurrent: () => PopUp;
    instances: { [id: string]: PopUpInstance };
    show: (options: PopUpOptions) => PopUp;
    showActions: (
        options: Omit<PopUpOptions, "actions">,
        actions: PopUpAction[],
    ) => PopUp;
    showAlert: (content: Content, onClose?: PopUpOptions["onClose"]) => PopUp;
    showConfirm: (
        options: Omit<PopUpOptions, "actions">,
        onYes: () => void,
        onNo?: () => void,
    ) => PopUp;
}

Represents a utility for managing UI modals.

Type declaration

  • create: (id: string, options: PopUpOptions) => PopUp

    Creates a unique (by id) modal.

  • getCurrent: () => PopUp

    Gets the current modal instance.

  • instances: { [id: string]: PopUpInstance }

    Dictionary of modal instances in memory.

  • show: (options: PopUpOptions) => PopUp

    Creates a non-unique modal.

  • showActions: (options: Omit<PopUpOptions, "actions">, actions: PopUpAction[]) => PopUp

    Shows a modal with custom actions.

  • showAlert: (content: Content, onClose?: PopUpOptions["onClose"]) => PopUp

    Shows an alert style modal.

  • showConfirm: (
        options: Omit<PopUpOptions, "actions">,
        onYes: () => void,
        onNo?: () => void,
    ) => PopUp

    Shows a confirm style modal.