This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-js/lib/src/native/modal.d.ts
2020-05-16 19:01:17 +08:00

25 lines
685 B
TypeScript

import { BridgeContext } from "../runtime/global";
import { Gravity } from "../util/gravity";
export declare function modal(context: BridgeContext): {
toast: (msg: string, gravity?: Gravity) => void;
alert: (arg: string | {
title: string;
msg: string;
okLabel?: string;
}) => Promise<any>;
confirm: (arg: string | {
title: string;
msg: string;
okLabel?: string;
cancelLabel?: string;
}) => Promise<any>;
prompt: (arg: {
title?: string;
msg?: string;
okLabel?: string;
cancelLabel?: string;
text?: string;
defaultText?: string;
}) => Promise<string>;
};