A hook that provides a confirm dialog functionality.

  • Parameters

    • Optionalparams: IParams

      The parameter object.

      • title

        The default title of the confirm dialog.

      • msg

        The default message of the confirm dialog.

      • canCancel

        The default cancelability flag of the confirm dialog.

    Returns (
        __namedParameters?: Partial<IParams>,
    ) => { then: (onData: Fn) => void; toPromise: () => Promise<boolean> }

    • A function that can be invoked to show the confirm dialog.