From d779abe967be760503bad0b9c907bf97a45e0963 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Wed, 11 Dec 2024 17:20:26 +0100 Subject: [PATCH] use a single prop to close modal --- scripts/core/prompt-modal.tsx | 10 ++++------ scripts/core/ui-utils.tsx | 11 +++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/core/prompt-modal.tsx b/scripts/core/prompt-modal.tsx index c05c41e4cb..40158bf491 100644 --- a/scripts/core/prompt-modal.tsx +++ b/scripts/core/prompt-modal.tsx @@ -4,8 +4,7 @@ import {gettext} from './utils'; interface IProps { label: string; - closeModal(): void; - onDone(value: string): void; + closeModal(result: {value: string | null}): void; okButtonText?: string; cancelButtonText?: string; } @@ -27,21 +26,20 @@ export class PromptModal extends React.Component { this.props.closeModal({value: null})} footerTemplate={ (