Skip to content

Commit

Permalink
fix: fix steps some hover active style (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaiQiangReal authored Sep 21, 2023
1 parent 6c72188 commit ea3a994
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 4 additions & 1 deletion packages/semi-foundation/steps/bacisSteps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,15 @@ $basicType: #{$module}-basic;
vertical-align: top;
overflow: hidden;
flex: 1;
cursor: pointer;
transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text, //step文字color的transition变化
background-color $transition_duration-steps_item-backgroundColor $transition_function-steps_item_backgroundColor $transition_delay-steps_item_backgroundColor; //step backgroundColor 的transition变化

transform:scale($transform_scale-step-item);

&-clickable {
cursor: pointer;
}

&-hover:hover {

.#{$item}-title {
Expand Down
8 changes: 4 additions & 4 deletions packages/semi-foundation/steps/fillSteps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $module: #{$prefix}-steps;
}
}

&:active {
&-active:active {
background-color: $color-steps-bg-active;

.#{$prefix}-icon,
Expand All @@ -127,7 +127,7 @@ $module: #{$prefix}-steps;
}
}

&:active {
&-active:active {
background-color: $color-steps-bg-active;

.#{$prefix}-icon,
Expand All @@ -153,7 +153,7 @@ $module: #{$prefix}-steps;
}
}

&:active {
&-active:active {
background-color: $color-steps-bg-active;

.#{$module}-item-title,
Expand Down Expand Up @@ -195,4 +195,4 @@ $module: #{$prefix}-steps;
overflow: hidden;
}
}
}
}
1 change: 1 addition & 0 deletions packages/semi-ui/steps/basicStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const BasicStep = (props: BasicStepProps) => {
[`${prefixCls}-active`]: active,
[`${prefixCls}-done`]: done,
[`${prefixCls}-hover`]: onChange || props.onClick,
[`${prefixCls}-clickable`]: (onChange || onClick),
[`${prefixCls}-${status}-hover`]: onChange || props.onClick,
}, className);
const handleClick = (e: React.MouseEvent<HTMLDivElement>) => {
Expand Down
3 changes: 2 additions & 1 deletion packages/semi-ui/steps/fillStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ const FillStep = (props: FillStepProps) => {
[prefixCls]: true,
[`${prefixCls}-${status}`]: Boolean(status),
[`${prefixCls}-${status}-hover`]: Boolean(status) && (onChange || onClick),
[`${prefixCls}-clickable`]: onClick,
[`${prefixCls}-${status}-active`]: Boolean(status) && (onChange || onClick),
[`${prefixCls}-clickable`]: (onChange || onClick),
}, className)}
style={style}
onClick={e => {
Expand Down

0 comments on commit ea3a994

Please sign in to comment.