From 4fd206dcddb430ac4389f1c543f40f470a559988 Mon Sep 17 00:00:00 2001 From: Wade King Date: Wed, 6 Dec 2023 09:38:46 -0800 Subject: [PATCH] feat: added support for reporting in error modal (#1036) Signed-off-by: wadeking98 --- .../legacy/core/App/components/misc/InfoBox.tsx | 15 +++++++++++++++ .../core/App/components/modals/ErrorModal.tsx | 8 +++++++- packages/legacy/core/App/localization/en/index.ts | 1 + packages/legacy/core/App/localization/fr/index.ts | 1 + .../legacy/core/App/localization/pt-br/index.ts | 1 + 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/packages/legacy/core/App/components/misc/InfoBox.tsx b/packages/legacy/core/App/components/misc/InfoBox.tsx index 3042d6e68c..cb02a5bb10 100644 --- a/packages/legacy/core/App/components/misc/InfoBox.tsx +++ b/packages/legacy/core/App/components/misc/InfoBox.tsx @@ -25,6 +25,8 @@ interface BifoldErrorProps { description?: string bodyContent?: Element message?: string + secondaryCallToActionTitle?: string + secondaryCallToActionPressed?: GenericFn onCallToActionPressed?: GenericFn onCallToActionLabel?: string onClosePressed?: GenericFn @@ -36,6 +38,8 @@ const InfoBox: React.FC = ({ description, bodyContent, message, + secondaryCallToActionTitle, + secondaryCallToActionPressed, onCallToActionPressed, onCallToActionLabel, onClosePressed, @@ -228,6 +232,17 @@ const InfoBox: React.FC = ({ /> )} + {secondaryCallToActionTitle && secondaryCallToActionPressed && ( + +