@@ -63,18 +63,25 @@ const disabledMixin = ({
63
63
}
64
64
` ;
65
65
66
+ const checkedMixin = ( { theme : { colorList } } ) => css `
67
+ color : ${ colorList . primary2 } ;
68
+ background : ${ colorList . primary4 } ;
69
+ border-color : ${ colorList . primary2 } ;
70
+ ` ;
71
+
66
72
export const ButtonWrap = styled . button . attrs ( {
67
- className : ( { size, styleType, shape, loading, disabled } ) =>
73
+ className : ( { size, styleType, shape, loading, disabled, checked } ) =>
68
74
classnames (
69
75
prefixCls ,
70
76
`${ prefixCls } -size-${ size } ` ,
71
77
`${ prefixCls } -styletype-${ styleType } ` ,
72
78
shape && `${ prefixCls } -${ shape } ` ,
73
79
loading && `${ prefixCls } -loading` ,
74
- disabled && `${ prefixCls } -disabled`
80
+ disabled && `${ prefixCls } -disabled` ,
81
+ checked && `${ prefixCls } -checked`
75
82
)
76
83
} ) (
77
- ( { theme : { fontSize, Button : buttonTheme = { } } , loading, shape, disabled } ) => css `
84
+ ( { theme : { fontSize, Button : buttonTheme = { } } , loading, shape, disabled, checked } ) => css `
78
85
box-sizing : border-box;
79
86
border-radius : 2px ;
80
87
border-width : 1px ;
@@ -90,6 +97,7 @@ export const ButtonWrap = styled.button.attrs({
90
97
${ styleTypeMixin } ;
91
98
${ shape === 'circle' && shapeCircleMixin } ;
92
99
${ loading && loadingMixin } ;
100
+ ${ checked && checkedMixin } ;
93
101
${ disabled && disabledMixin } ;
94
102
95
103
${ buttonTheme [ '&' ] } ;
0 commit comments