updated the dialog actions for the submit and cancel buttons

This commit is contained in:
csawatzky 2025-03-04 13:44:13 -06:00
parent f2cf950a6b
commit 1982a93bf0
6 changed files with 45 additions and 29 deletions

View file

@ -23,6 +23,7 @@ import {
Typography
} from "@mui/material";
import { makeStyles } from "@mui/styles";
import CancelSubmit from "common/CancelSubmit";
// import { darken, lighten } from "@material-ui/core/styles/colorManipulator";
// import { Theme } from "@material-ui/core/styles/createMuiTheme";
import DeleteButton from "common/DeleteButton";
@ -435,7 +436,7 @@ export default function GroupSettings(props: Props) {
const actions = () => {
return (
<Grid2 container justifyContent="space-between" direction="row">
<Grid2 container justifyContent="space-between" direction="row" width={"100%"}>
<Grid2 size={{ xs: 5 }}>
{mode === "add" ? (
<Button onClick={backStep} color="primary" disabled={tabIndex === 0}>
@ -447,7 +448,12 @@ export default function GroupSettings(props: Props) {
)}
</Grid2>
<Grid2 size={{ xs: 7 }} container justifyContent="flex-end">
<Button onClick={close} color="primary">
<CancelSubmit
onSubmit={(mode === "add" && tabIndex === steps.length - 1) || mode === "update" ? submit : nextStep}
submitText={(mode === "add" && tabIndex === steps.length - 1) || mode === "update" ? "Submit" : "Next"}
onCancel={close}
submitDisabled={!isFormValid()}/>
{/* <Button onClick={close} color="primary">
Cancel
</Button>
{(mode === "add" && tabIndex === steps.length - 1) || mode === "update"
@ -460,7 +466,7 @@ export default function GroupSettings(props: Props) {
<Button onClick={nextStep} color="primary">
Next
</Button>
)}
)} */}
</Grid2>
</Grid2>
);