From 672778ca5d9de5513c86d70394b2dd048639cdea Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 1 Jul 2021 17:16:20 +0800 Subject: ... --- .../src/views/common/dailog/OperationDialog.tsx | 49 ++++++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) (limited to 'FrontEnd/src/views/common/dailog/OperationDialog.tsx') diff --git a/FrontEnd/src/views/common/dailog/OperationDialog.tsx b/FrontEnd/src/views/common/dailog/OperationDialog.tsx index f394a3d3..083d60da 100644 --- a/FrontEnd/src/views/common/dailog/OperationDialog.tsx +++ b/FrontEnd/src/views/common/dailog/OperationDialog.tsx @@ -12,6 +12,7 @@ import LoadingButton from "../button/LoadingButton"; import Dialog from "./Dialog"; import "./OperationDialog.css"; +import classNames from "classnames"; interface DefaultErrorPromptProps { error?: string; @@ -294,9 +295,17 @@ const OperationDialog = < if (item.type === "text") { return ( -
+
{item.label && ( - + )} - {error != null &&
{error}
} - {item.helperText &&
{t(item.helperText)}
} + {error != null && ( +
+ {error} +
+ )} + {item.helperText && ( +
+ {t(item.helperText)} +
+ )}
); } else if (item.type === "bool") { @@ -327,8 +344,16 @@ const OperationDialog = < ); } else if (item.type === "select") { return ( -
- +
+