chore: update some detail styles (#2168)

* chore: update some detail styls

* chore: update
This commit is contained in:
boojack
2023-08-24 21:52:16 +08:00
committed by GitHub
parent 6c01e84099
commit d3bd3ddab0
12 changed files with 98 additions and 207 deletions

View File

@ -1,14 +1,14 @@
import { Button } from "@mui/joy";
import { DefaultColorPalette } from "@mui/joy/styles/types";
import { useTranslate } from "@/utils/i18n";
import Icon from "../Icon";
import { generateDialog } from "./BaseDialog";
import "@/less/common-dialog.less";
type DialogStyle = "info" | "warning";
interface Props extends DialogProps {
title: string;
content: string;
style?: DialogStyle;
style?: DefaultColorPalette;
closeBtnText?: string;
confirmBtnText?: string;
onClose?: () => void;
@ -18,7 +18,7 @@ interface Props extends DialogProps {
const defaultProps = {
title: "",
content: "",
style: "info",
style: "neutral",
closeBtnText: "common.close",
confirmBtnText: "common.confirm",
onClose: () => null,
@ -54,13 +54,13 @@ const CommonDialog: React.FC<Props> = (props: Props) => {
</div>
<div className="dialog-content-container">
<p className="content-text">{content}</p>
<div className="btns-container">
<span className="btn cancel-btn" onClick={handleCloseBtnClick}>
<div className="mt-4 w-full flex flex-row justify-end items-center gap-2">
<Button color="neutral" variant="plain" onClick={handleCloseBtnClick}>
{closeBtnText}
</span>
<span className={`btn confirm-btn ${style}`} onClick={handleConfirmBtnClick}>
</Button>
<Button color={style} onClick={handleConfirmBtnClick}>
{confirmBtnText}
</span>
</Button>
</div>
</div>
</>
@ -71,7 +71,7 @@ interface CommonDialogProps {
title: string;
content: string;
className?: string;
style?: DialogStyle;
style?: DefaultColorPalette;
dialogName: string;
closeBtnText?: string;
confirmBtnText?: string;