UNPKG

@kwiz/fluentui

Version:

KWIZ common controls for FluentUI

15 lines (14 loc) 733 B
import { IPrompterProps } from "../controls/prompt"; export interface iAlerts { promptEX: (info: IPrompterProps) => void; confirmEX: (message: string | JSX.Element, onOK?: () => void, onCancel?: () => void) => Promise<boolean>; alertEX: (message: string | JSX.Element, onOK?: () => void) => Promise<void>; alertPrompt?: JSX.Element; close: () => void; } /** set block message if you want to block nav. * - call setMessage to add a blocker message * - call onNav when you have internal navigation (open / close popups) * - render the navPrompt control to your page * FYI for page unload, most modern browsers won't show your message but a generic one instead. */ export declare function useAlerts(): iAlerts;