1
1
import MuiDialog , { DialogProps as MuiDialogProps } from "@material-ui/core/Dialog"
2
2
import MuiDialogTitle from "@material-ui/core/DialogTitle"
3
- import { darken , fade , lighten , makeStyles } from "@material-ui/core/styles"
3
+ import { alpha , darken , lighten , makeStyles } from "@material-ui/core/styles"
4
4
import SvgIcon from "@material-ui/core/SvgIcon"
5
5
import * as React from "react"
6
6
import { combineClasses } from "../../util/combineClasses"
@@ -57,7 +57,7 @@ const useTitleStyles = makeStyles(
57
57
icon : {
58
58
height : 84 ,
59
59
width : 84 ,
60
- color : fade ( theme . palette . action . disabled , 0.4 ) ,
60
+ color : alpha ( theme . palette . action . disabled , 0.4 ) ,
61
61
} ,
62
62
} ) ,
63
63
{ name : "CdrDialogTitle" } ,
@@ -155,27 +155,27 @@ const useButtonStyles = makeStyles((theme) => ({
155
155
boxShadow : "none" ,
156
156
} ,
157
157
cancelButton : {
158
- background : fade ( theme . palette . primary . main , 0.1 ) ,
158
+ background : alpha ( theme . palette . primary . main , 0.1 ) ,
159
159
color : theme . palette . primary . main ,
160
160
161
161
"&:hover" : {
162
- background : fade ( theme . palette . primary . main , 0.3 ) ,
162
+ background : alpha ( theme . palette . primary . main , 0.3 ) ,
163
163
} ,
164
164
} ,
165
165
confirmDialogCancelButton : ( props : StyleProps ) => {
166
166
const color =
167
167
props . type === "info" ? theme . palette . primary . contrastText : theme . palette . error . contrastText
168
168
return {
169
- background : fade ( color , 0.15 ) ,
169
+ background : alpha ( color , 0.15 ) ,
170
170
color,
171
171
172
172
"&:hover" : {
173
- background : fade ( color , 0.3 ) ,
173
+ background : alpha ( color , 0.3 ) ,
174
174
} ,
175
175
176
176
"&.Mui-disabled" : {
177
- background : fade ( color , 0.15 ) ,
178
- color : fade ( color , 0.5 ) ,
177
+ background : alpha ( color , 0.15 ) ,
178
+ color : alpha ( color , 0.5 ) ,
179
179
} ,
180
180
}
181
181
} ,
@@ -214,15 +214,15 @@ const useButtonStyles = makeStyles((theme) => ({
214
214
} ,
215
215
"&.Mui-disabled" : {
216
216
backgroundColor : theme . palette . action . disabledBackground ,
217
- color : fade ( theme . palette . text . disabled , 0.5 ) ,
217
+ color : alpha ( theme . palette . text . disabled , 0.5 ) ,
218
218
} ,
219
219
} ,
220
220
221
221
"&.MuiButton-outlined" : {
222
222
color : theme . palette . error . main ,
223
223
borderColor : theme . palette . error . main ,
224
224
"&:hover" : {
225
- backgroundColor : fade ( theme . palette . error . main , theme . palette . action . hoverOpacity ) ,
225
+ backgroundColor : alpha ( theme . palette . error . main , theme . palette . action . hoverOpacity ) ,
226
226
"@media (hover: none)" : {
227
227
backgroundColor : "transparent" ,
228
228
} ,
@@ -231,21 +231,21 @@ const useButtonStyles = makeStyles((theme) => ({
231
231
} ,
232
232
} ,
233
233
"&.Mui-disabled" : {
234
- color : fade ( theme . palette . text . disabled , 0.5 ) ,
234
+ color : alpha ( theme . palette . text . disabled , 0.5 ) ,
235
235
borderColor : theme . palette . action . disabled ,
236
236
} ,
237
237
} ,
238
238
239
239
"&.MuiButton-text" : {
240
240
color : theme . palette . error . main ,
241
241
"&:hover" : {
242
- backgroundColor : fade ( theme . palette . error . main , theme . palette . action . hoverOpacity ) ,
242
+ backgroundColor : alpha ( theme . palette . error . main , theme . palette . action . hoverOpacity ) ,
243
243
"@media (hover: none)" : {
244
244
backgroundColor : "transparent" ,
245
245
} ,
246
246
} ,
247
247
"&.Mui-disabled" : {
248
- color : fade ( theme . palette . text . disabled , 0.5 ) ,
248
+ color : alpha ( theme . palette . text . disabled , 0.5 ) ,
249
249
} ,
250
250
} ,
251
251
} ,
@@ -264,15 +264,15 @@ const useButtonStyles = makeStyles((theme) => ({
264
264
} ,
265
265
"&.Mui-disabled" : {
266
266
backgroundColor : theme . palette . action . disabledBackground ,
267
- color : fade ( theme . palette . text . disabled , 0.5 ) ,
267
+ color : alpha ( theme . palette . text . disabled , 0.5 ) ,
268
268
} ,
269
269
} ,
270
270
271
271
"&.MuiButton-outlined" : {
272
272
color : theme . palette . success . main ,
273
273
borderColor : theme . palette . success . main ,
274
274
"&:hover" : {
275
- backgroundColor : fade ( theme . palette . success . main , theme . palette . action . hoverOpacity ) ,
275
+ backgroundColor : alpha ( theme . palette . success . main , theme . palette . action . hoverOpacity ) ,
276
276
"@media (hover: none)" : {
277
277
backgroundColor : "transparent" ,
278
278
} ,
@@ -281,21 +281,21 @@ const useButtonStyles = makeStyles((theme) => ({
281
281
} ,
282
282
} ,
283
283
"&.Mui-disabled" : {
284
- color : fade ( theme . palette . text . disabled , 0.5 ) ,
284
+ color : alpha ( theme . palette . text . disabled , 0.5 ) ,
285
285
borderColor : theme . palette . action . disabled ,
286
286
} ,
287
287
} ,
288
288
289
289
"&.MuiButton-text" : {
290
290
color : theme . palette . success . main ,
291
291
"&:hover" : {
292
- backgroundColor : fade ( theme . palette . success . main , theme . palette . action . hoverOpacity ) ,
292
+ backgroundColor : alpha ( theme . palette . success . main , theme . palette . action . hoverOpacity ) ,
293
293
"@media (hover: none)" : {
294
294
backgroundColor : "transparent" ,
295
295
} ,
296
296
} ,
297
297
"&.Mui-disabled" : {
298
- color : fade ( theme . palette . text . disabled , 0.5 ) ,
298
+ color : alpha ( theme . palette . text . disabled , 0.5 ) ,
299
299
} ,
300
300
} ,
301
301
} ,
0 commit comments