only keep button enabled if submit is loading
This commit is contained in:
parent
ee81cbfd79
commit
24db0e5d3c
|
@ -26,10 +26,15 @@ const SubmitButton: FC<ButtonProps<'button', SubmitButtonProps>> = ({
|
||||||
disabled={disabled || loading || success}
|
disabled={disabled || loading || success}
|
||||||
sx={{
|
sx={{
|
||||||
my: 4,
|
my: 4,
|
||||||
'&.Mui-disabled': {
|
...(loading
|
||||||
backgroundColor: (theme) => theme.palette.accent.main,
|
? {
|
||||||
color: (theme) => theme.palette.text.primary,
|
'&.Mui-disabled': {
|
||||||
},
|
backgroundColor: (theme) =>
|
||||||
|
theme.palette.accent.main,
|
||||||
|
color: (theme) => theme.palette.text.primary,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
{...props}>
|
{...props}>
|
||||||
|
|
Loading…
Reference in a new issue