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

25 lines
793 B
TypeScript
Raw Normal View History

2020-01-03 14:44:51 +08:00
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 | undefined;
}) => Promise<any>;
confirm: (arg: string | {
title: string;
msg: string;
okLabel?: string | undefined;
cancelLabel?: string | undefined;
}) => Promise<any>;
prompt: (arg: {
title?: string | undefined;
msg?: string | undefined;
okLabel?: string | undefined;
cancelLabel?: string | undefined;
text?: string | undefined;
defaultText?: string | undefined;
}) => Promise<string>;
};