@@ -39,73 +39,71 @@ const CheckboxComponent = ({ className, size, ...props }) => (
3939)
4040
4141const Checkbox = styled ( CheckboxComponent ) `
42- &.sui-checkbox {
43- display: inline-block;
44- position: relative;
45- width: 1.5rem;
46- height: 1.5rem;
47- z-index: ${ props => props . theme . zIndexes . control } ;
42+ display: inline-block;
43+ position: relative;
44+ width: 1.5rem;
45+ height: 1.5rem;
46+ z-index: ${ props => props . theme . zIndexes . control } ;
4847
49- .sui-checkbox-content {
50- display: flex;
51- align-items: center;
52- justify-content: center;
53- width: 1rem;
54- height: 1rem;
55- background-color: ${ props => props . theme . colors . white } ;
56- border-radius: ${ props => props . theme . borderRadius . md } ;
57- border: 1px solid ${ props => props . theme . colors . controlBorder } ;
58- transition: border-color ${ props => props . theme . transition . time } ,
59- background-color ${ props => props . theme . transition . time } ,
60- box-shadow ${ props => props . theme . transition . time } ;
61-
62- &.checked {
63- background-color: ${ props => props . theme . colors . primary } ;
64- border-color: transparent;
48+ .sui-checkbox-content {
49+ display: flex;
50+ align-items: center;
51+ justify-content: center;
52+ width: 1rem;
53+ height: 1rem;
54+ background-color: ${ props => props . theme . colors . white } ;
55+ border-radius: ${ props => props . theme . borderRadius . md } ;
56+ border: 1px solid ${ props => props . theme . colors . controlBorder } ;
57+ transition: border-color ${ props => props . theme . transition . time } ,
58+ background-color ${ props => props . theme . transition . time } ,
59+ box-shadow ${ props => props . theme . transition . time } ;
6560
66- svg {
67- transform: scale(1);
68- }
69- }
61+ &.checked {
62+ background-color: ${ props => props . theme . colors . primary } ;
63+ border-color: transparent;
7064
71- &.focused {
72- ${ props => props . theme . mixins . controlFocus } ;
65+ svg {
66+ transform: scale(1) ;
7367 }
68+ }
7469
75- &.disabled {
76- background-color: ${ props => props . theme . colors . disabledControlBg } ;
77- }
70+ &.focused {
71+ ${ props => props . theme . mixins . controlFocus } ;
7872 }
7973
80- svg {
81- width: 0.75rem;
82- pointer-events: none;
83- transform: scale(0);
84- transition: transform ${ props => props . theme . transition . time } ;
74+ &.disabled {
75+ background-color: ${ props => props . theme . colors . disabledControlBg } ;
8576 }
77+ }
8678
87- &.sui-checkbox-sm {
88- .sui-checkbox-content {
89- border-radius: ${ props => props . theme . borderRadius . sm } ;
90- width: 0.875rem ;
91- height: 0.875rem ;
92- }
79+ svg {
80+ width: 0.75rem;
81+ pointer-events: none ;
82+ transform: scale(0) ;
83+ transition: transform ${ props => props . theme . transition . time } ;
84+ }
9385
94- svg {
95- width: 0.65rem;
96- }
86+ &.sui-checkbox-sm {
87+ .sui-checkbox-content {
88+ border-radius: ${ props => props . theme . borderRadius . sm } ;
89+ width: 0.875rem;
90+ height: 0.875rem;
9791 }
9892
99- &.sui-checkbox-lg {
100- .sui-checkbox-content {
101- border-radius: ${ props => props . theme . borderRadius . lg } ;
102- width: 1.25rem;
103- height: 1.25rem;
104- }
93+ svg {
94+ width: 0.65rem;
95+ }
96+ }
10597
106- svg {
107- width: 0.9375rem;
108- }
98+ &.sui-checkbox-lg {
99+ .sui-checkbox-content {
100+ border-radius: ${ props => props . theme . borderRadius . lg } ;
101+ width: 1.25rem;
102+ height: 1.25rem;
103+ }
104+
105+ svg {
106+ width: 0.9375rem;
109107 }
110108 }
111109`
0 commit comments