Add width'height to info

master
Kuba Orlik 4 years ago
parent 8693fab66c
commit 8bb828191d

@ -3,15 +3,22 @@ import Dialog, { DialogResponse } from "./dialog";
export default class Info {
static async show(
text: string,
options?: Partial<{
options: Partial<{
"icon-name": string;
"no-wrap": true;
"no-markup": true;
ellipsize: true;
title: string;
}>
width: number;
height: number;
}> = {}
): Promise<DialogResponse> {
const dialog = new Dialog("info", { ...options, text });
const dialog = new Dialog("info", {
...options,
width: options.width?.toString(),
height: options.height?.toString(),
text,
});
await dialog.show();
return dialog.getAnswer();
}

Loading…
Cancel
Save