diff options
author | crupest <crupest@outlook.com> | 2020-11-20 20:56:59 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-11-20 20:56:59 +0800 |
commit | 439b28b8950b3acd34d415ecca2476647cc226f1 (patch) | |
tree | ec5b7b54179cd3e3beef78ebfa80a5f0cac06df5 /FrontEnd/src/app/views/common/OperationDialog.tsx | |
parent | 34ce9e1c2734a4dc1b364b76c7042839c9172aef (diff) | |
download | timeline-439b28b8950b3acd34d415ecca2476647cc226f1.tar.gz timeline-439b28b8950b3acd34d415ecca2476647cc226f1.tar.bz2 timeline-439b28b8950b3acd34d415ecca2476647cc226f1.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/common/OperationDialog.tsx')
-rw-r--r-- | FrontEnd/src/app/views/common/OperationDialog.tsx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/FrontEnd/src/app/views/common/OperationDialog.tsx b/FrontEnd/src/app/views/common/OperationDialog.tsx index bca5cb87..77ed851f 100644 --- a/FrontEnd/src/app/views/common/OperationDialog.tsx +++ b/FrontEnd/src/app/views/common/OperationDialog.tsx @@ -99,7 +99,7 @@ export interface OperationDialogProps< open: boolean; close: () => void; title: I18nText | (() => React.ReactNode); - titleColor?: "default" | "dangerous" | "create" | string; + themeColor?: "danger" | "success" | string; onProcess: ( inputs: MapOperationInputInfoValueTypeList<OperationInputInfoList> ) => Promise<TData>; @@ -313,7 +313,7 @@ const OperationDialog = < {t("operationDialog.cancel")} </Button> <LoadingButton - variant="primary" + variant={props.themeColor} loading={process} disabled={!canProcess} onClick={() => { @@ -362,14 +362,7 @@ const OperationDialog = < <Modal show={props.open} onHide={close}> <Modal.Header className={ - props.titleColor != null - ? "text-" + - (props.titleColor === "create" - ? "success" - : props.titleColor === "dangerous" - ? "danger" - : props.titleColor) - : undefined + props.themeColor != null ? "text-" + props.themeColor : undefined } > {title} |