From 8bb828191de80d28ac64403434405337ce0c2860 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sat, 2 Jan 2021 19:57:35 +0100 Subject: [PATCH] Add width'height to info --- src/info.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/info.ts b/src/info.ts index d91d00b..90db018 100644 --- a/src/info.ts +++ b/src/info.ts @@ -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 { - 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(); }