Skip to content

Commit

Permalink
style: [Checkbox] Modify unreasonable naming, undisabled -> enable (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
YyumeiZhang committed Sep 13, 2024
1 parent edc172d commit f8004df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/semi-foundation/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ $module: #{$prefix}-checkbox;
}
}

&.#{$module}-cardType.#{$module}-unChecked.#{$module}-cardType_unDisabled {
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-cardType_enable {
.#{$module}-inner-display {
background: $color-checkbox_cardType_inner-bg-hover;
}
Expand All @@ -175,7 +175,7 @@ $module: #{$prefix}-checkbox;
}
}

&.#{$module}-cardType.#{$module}-unChecked.#{$module}-cardType_unDisabled {
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-cardType_enable {
.#{$module}-inner-display {
background: $color-checkbox_cardType_inner-bg-active;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-ui/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
[`${prefix}-unChecked`]: !props.checked,
[`${prefix}-cardType`]: props.isCardType,
[`${prefix}-cardType_disabled`]: props.disabled && props.isCardType,
[`${prefix}-cardType_unDisabled`]: !(props.disabled && props.isCardType),
[`${prefix}-cardType_enable`]: !(props.disabled && props.isCardType),
[`${prefix}-cardType_checked`]: props.isCardType && props.checked && !props.disabled,
[`${prefix}-cardType_checked_disabled`]: props.isCardType && props.checked && props.disabled,
[className]: Boolean(className),
Expand Down

0 comments on commit f8004df

Please sign in to comment.