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

@ -67,6 +67,7 @@ import {
Add as AddIcon,
} from "@mui/icons-material"
import CancelSubmit from "common/CancelSubmit";
const useStyles = makeStyles((theme: Theme) => {
return ({
@ -820,7 +821,7 @@ export default function ComponentSettings(props: Props) {
const actions = () => {
return (
<DialogActions>
<Grid container justifyContent="space-between" direction="row">
<Grid container justifyContent="space-between" direction="row" width={"100%"}>
<Grid size={{ xs: 5 }} >
{mode === "add" ? (
<Button disabled={activeStep === 0} onClick={stepBack} color="primary">
@ -834,7 +835,9 @@ export default function ComponentSettings(props: Props) {
{mode === "add" ? (
<React.Fragment>
<Button onClick={close} color="primary">
Cancel
<Typography variant="subtitle2" color="textPrimary">
Cancel
</Typography>
</Button>
{activeStep === steps.length - 1 ? (
<Button color="primary" onClick={addComponent} disabled={!formValid}>
@ -848,14 +851,15 @@ export default function ComponentSettings(props: Props) {
</React.Fragment>
) : (
<React.Fragment>
<Button onClick={close} color="primary">
<CancelSubmit onSubmit={updateComponent} onCancel={close} submitDisabled={!canEdit || !formValid}/>
{/* <Button onClick={close} color="primary">
Cancel
</Button>
{canEdit && (
<Button onClick={updateComponent} color="primary" disabled={!formValid}>
Submit
</Button>
)}
)} */}
</React.Fragment>
)}
</Grid>