@@ -12,8 +12,6 @@ export interface DialogActionButtonsProps {
12
12
confirmText ?: ReactNode ;
13
13
/** Whether or not confirm is loading, also disables cancel when true */
14
14
confirmLoading ?: boolean ;
15
- /** Whether or not this is a confirm dialog */
16
- confirmDialog ?: boolean ;
17
15
/** Whether or not the submit button is disabled */
18
16
disabled ?: boolean ;
19
17
/** Called when cancel is clicked */
@@ -49,6 +47,7 @@ export const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({
49
47
{ cancelText }
50
48
</ LoadingButton >
51
49
) }
50
+
52
51
{ onConfirm && (
53
52
< LoadingButton
54
53
fullWidth
@@ -76,7 +75,10 @@ const styles = {
76
75
"&.MuiButton-contained" : {
77
76
backgroundColor : colors . red [ 10 ] ,
78
77
borderColor : colors . red [ 9 ] ,
79
- color : theme . palette . text . primary ,
78
+
79
+ "&:not(.MuiLoadingButton-loading)" : {
80
+ color : theme . palette . text . primary ,
81
+ } ,
80
82
81
83
"&:hover:not(:disabled)" : {
82
84
backgroundColor : colors . red [ 9 ] ,
@@ -86,26 +88,39 @@ const styles = {
86
88
"&.Mui-disabled" : {
87
89
backgroundColor : colors . red [ 15 ] ,
88
90
borderColor : colors . red [ 15 ] ,
89
- color : colors . red [ 9 ] ,
91
+
92
+ "&:not(.MuiLoadingButton-loading)" : {
93
+ color : colors . red [ 9 ] ,
94
+ } ,
90
95
} ,
91
96
} ,
92
97
} ) ,
93
98
successButton : ( theme ) => ( {
94
99
"&.MuiButton-contained" : {
95
100
backgroundColor : theme . palette . success . main ,
96
- color : theme . palette . primary . contrastText ,
101
+
102
+ "&:not(.MuiLoadingButton-loading)" : {
103
+ color : theme . palette . primary . contrastText ,
104
+ } ,
105
+
97
106
"&:hover" : {
98
107
backgroundColor : theme . palette . success . dark ,
108
+
99
109
"@media (hover: none)" : {
100
110
backgroundColor : "transparent" ,
101
111
} ,
112
+
102
113
"&.Mui-disabled" : {
103
114
backgroundColor : "transparent" ,
104
115
} ,
105
116
} ,
117
+
106
118
"&.Mui-disabled" : {
107
- backgroundColor : theme . palette . action . disabledBackground ,
108
- color : theme . palette . text . secondary ,
119
+ backgroundColor : theme . palette . success . dark ,
120
+
121
+ "&:not(.MuiLoadingButton-loading)" : {
122
+ color : theme . palette . text . secondary ,
123
+ } ,
109
124
} ,
110
125
} ,
111
126
0 commit comments