@@ -54,20 +54,20 @@ export const deprecateButtonGradientColor = {
54
54
const color2ParentHover = getAttribute ( 'backgroundColor2ParentHover' ) || color1ParentHover
55
55
const gradientDirectionParentHover = getAttribute ( 'backgroundGradientDirectionParentHover' ) || getAttribute ( 'backgroundGradientDirectionParentHover' ) === 0 ? getAttribute ( 'backgroundGradientDirectionParentHover' ) : 90
56
56
57
- const isColor1Gradient = color1 && color1 . includes ( 'linear -gradient' )
58
- const isColor2Gradient = color2 && color2 . includes ( 'linear -gradient' )
57
+ const isColor1Gradient = color1 && color1 . includes ( '-gradient' )
58
+ const isColor2Gradient = color2 && color2 . includes ( '-gradient' )
59
59
if ( color1 && color2 && ! isColor1Gradient && ! isColor2Gradient ) {
60
60
newAttributes [ getAttrName ( 'backgroundColor' ) ] = `linear-gradient(${ gradientDirection } deg, ${ color1 } 0%, ${ color2 } 100%)`
61
61
}
62
62
63
- const isColor1HoverGradient = color1Hover && color1Hover . includes ( 'linear -gradient' )
64
- const isColor2HoverGradient = color2Hover && color2Hover . includes ( 'linear -gradient' )
63
+ const isColor1HoverGradient = color1Hover && color1Hover . includes ( '-gradient' )
64
+ const isColor2HoverGradient = color2Hover && color2Hover . includes ( '-gradient' )
65
65
if ( color1Hover && color2Hover && ! isColor1HoverGradient && ! isColor2HoverGradient ) {
66
66
newAttributes [ getAttrName ( 'backgroundColorHover' ) ] = `linear-gradient(${ gradientDirectionHover } deg, ${ color1Hover } 0%, ${ color2Hover } 100%)`
67
67
}
68
68
69
- const isColor1ParentHoverGradient = color1ParentHover && color1ParentHover . includes ( 'linear -gradient' )
70
- const isColor2ParentHoverGradient = color2ParentHover && color2ParentHover . includes ( 'linear -gradient' )
69
+ const isColor1ParentHoverGradient = color1ParentHover && color1ParentHover . includes ( '-gradient' )
70
+ const isColor2ParentHoverGradient = color2ParentHover && color2ParentHover . includes ( '-gradient' )
71
71
if ( color1ParentHover && color2ParentHover && ! isColor1ParentHoverGradient && ! isColor2ParentHoverGradient ) {
72
72
newAttributes [ getAttrName ( 'backgroundColorParentHover' ) ] = `linear-gradient(${ gradientDirectionParentHover } deg, ${ color1ParentHover } 0%, ${ color2ParentHover } 100%)`
73
73
}
0 commit comments