@@ -11,27 +11,28 @@ export function getButtonStyle(buttonStyle: ButtonStyleType, disabledStyle: Disa
1111 const hoverColor = buttonStyle . background && genHoverColor ( buttonStyle . background ) ;
1212 const activeColor = buttonStyle . background && genActiveColor ( buttonStyle . background ) ;
1313 return css `
14- & {
14+ & & & {
1515 border-radius : ${ buttonStyle . radius } ;
1616 border-width : ${ buttonStyle . borderWidth } ;
1717 margin : ${ buttonStyle . margin } ;
1818 padding : ${ buttonStyle . padding } ;
1919 rotate : ${ buttonStyle . rotation } ;
20+ --antd-wave-shadow-color : ${ buttonStyle . border } ;
21+ border-color : ${ buttonStyle . border } ;
22+ color : ${ buttonStyle . text } ;
23+ font-size : ${ buttonStyle . textSize } ;
24+ font-weight : ${ buttonStyle . textWeight } ;
25+ font-family : ${ buttonStyle . fontFamily } ;
26+ font-style : ${ buttonStyle . fontStyle } ;
27+ text-transform : ${ buttonStyle . textTransform } ;
28+ text-decoration : ${ buttonStyle . textDecoration } ;
29+ border-radius : ${ buttonStyle . radius } ;
30+ margin : ${ buttonStyle . margin } ;
31+ padding : ${ buttonStyle . padding } ;
32+
2033 & : not (: disabled ) {
21- --antd-wave-shadow-color : ${ buttonStyle . border } ;
22- border-color : ${ buttonStyle . border } ;
23- color : ${ buttonStyle . text } ;
24- font-size : ${ buttonStyle . textSize } ;
25- font-weight : ${ buttonStyle . textWeight } ;
26- font-family : ${ buttonStyle . fontFamily } ;
27- font-style : ${ buttonStyle . fontStyle } ;
28- text-transform : ${ buttonStyle . textTransform } ;
29- text-decoration : ${ buttonStyle . textDecoration } ;
3034 background : ${ buttonStyle . background } ;
31- border-radius : ${ buttonStyle . radius } ;
32- margin : ${ buttonStyle . margin } ;
33- padding : ${ buttonStyle . padding } ;
34-
35+
3536 & : hover ,
3637 & : focus {
3738 color : ${ buttonStyle . text } ;
@@ -48,14 +49,13 @@ export function getButtonStyle(buttonStyle: ButtonStyleType, disabledStyle: Disa
4849 : buttonStyle . border } !important ;
4950 }
5051 }
51-
52- /* Disabled state styling */
5352 & : disabled ,
54- & .ant-btn-disabled {
55- color : ${ disabledStyle . disabledText } ;
56- background : ${ disabledStyle . disabledBackground } ;
57- border-color : ${ disabledStyle . disabledBorder } ;
58- cursor : not-allowed;
53+ & .ant-btn-disabled ,
54+ & [disabled ] {
55+ background : ${ disabledStyle . disabledBackground } !important ;
56+ cursor : not-allowed !important ;
57+ color : ${ disabledStyle . disabledText || buttonStyle . text } !important ;
58+ border-color : ${ disabledStyle . disabledBorder || buttonStyle . border } !important ;
5959 }
6060 }
6161 ` ;
0 commit comments