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}
|
||||
sx={{
|
||||
my: 4,
|
||||
...(loading
|
||||
? {
|
||||
'&.Mui-disabled': {
|
||||
backgroundColor: (theme) => theme.palette.accent.main,
|
||||
backgroundColor: (theme) =>
|
||||
theme.palette.accent.main,
|
||||
color: (theme) => theme.palette.text.primary,
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...sx,
|
||||
}}
|
||||
{...props}>
|
||||
|
|
Loading…
Reference in a new issue