From efa213233bf83155d4ff0127ad65ca942e753edc Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Tue, 7 Jan 2025 16:40:19 +0100 Subject: [PATCH] feat: update toast message level to success and enhance styling for improved user feedback --- .../form/experiment-form/src/components/ExperimentForm.tsx | 6 +----- .../templates/form/experiment-form/src/components/Toast.tsx | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/backend/experiment/templates/form/experiment-form/src/components/ExperimentForm.tsx b/backend/experiment/templates/form/experiment-form/src/components/ExperimentForm.tsx index 18099683d..bcc08c00b 100644 --- a/backend/experiment/templates/form/experiment-form/src/components/ExperimentForm.tsx +++ b/backend/experiment/templates/form/experiment-form/src/components/ExperimentForm.tsx @@ -92,7 +92,7 @@ const ExperimentForm: React.FC = () => { addToast({ message: "Experiment saved successfully!", duration: 3000, - level: "info" + level: "success" }); } catch (err) { addToast({ @@ -161,10 +161,6 @@ const ExperimentForm: React.FC = () => {
- {error &&
{error}
} - {success &&
Saved successfully!
} - {saveError &&
{saveError}
} -
= ({ toast }) => { const bgColorClass = { info: 'bg-gray-800', + success: 'bg-green-600', warning: 'bg-yellow-600', error: 'bg-red-600' }[toast.level];