Skip to content

Commit

Permalink
fix(input): input button style error (#1567)
Browse files Browse the repository at this point in the history
  • Loading branch information
berber1016 committed Dec 1, 2021
1 parent 4597f09 commit f7adba3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 46 deletions.
1 change: 0 additions & 1 deletion src/input/InputButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const InputButton = React.forwardRef<HTMLInputElement, InputButtonProps>((props,
const wrapperCls = useMemo(
() =>
classNames(className, prefixCls, {
[`${prefixCls}__hover`]: !disabled,
[`${prefixCls}__disabled`]: disabled,
[`${prefixCls}__active`]: active,
}),
Expand Down
59 changes: 17 additions & 42 deletions src/input/style/InputButton.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,61 +19,36 @@
color: @gray-5;
.text-body1();
}
&:disabled {
color: @gray-3;
background-color: @gray-0;
&::placeholder {
color: @gray-3;
.text-body1();
}
&:hover {
color: @gray-3;
background-color: @gray-0;
&::placeholder {
color: @gray-3;
}
}
}

&:not([disabled]):hover {
&:not(&__disabled) &__hover,
&:not(&__disabled) &__active,
&:not(&__disabled):hover {
color: @blue-3;
background-color: @gray-1;
border: 1px solid @gray-2;

.@{icon-prefix-cls} {
svg {
color: @blue-3;
// cursor: not-allowed;
}
}
input {
color: @blue-3;
cursor: pointer;
}
}
&:is([disabled]):hover {
color: @gray-3;
border: 1px solid @gray-2;
}

&:not([disabled]):focus {
&:not(&__disabled):focus {
border: 1px solid @gray-2;
outline: none;
}

&__active,
&__hover {
&:hover {
.@{input-btn-input-prefix-cls} {
background-color: @gray-1;
}
input {
color: @blue-3;
cursor: pointer;
}
.@{input-prefix-cls} {
&__prefix {
color: @blue-3;
cursor: pointer;
svg {
color: @blue-3;
cursor: pointer;
}
}
}
}
}
&__disabled {
background-color: @gray-0;

cursor: not-allowed;
input {
color: @gray-3;
}
Expand Down
6 changes: 3 additions & 3 deletions src/list/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
white-space: nowrap;
text-overflow: ellipsis;
}
&:hover {
&:not(&--disabled):hover {
background-color: @gray-1;
}
&:last-child {
Expand All @@ -118,11 +118,11 @@
&:not(&--disabled):not(&--drag):active &-prefix-icon {
color: @blue-3;
}
&--actived:not(&--multiple) {
&--actived:not(&--disabled):not(&--multiple) {
color: @blue-3;
background-color: @gray-1;
}
&--actived:not(&--multiple) &-prefix-icon {
&--actived:not(&--disabled):not(&--multiple) &-prefix-icon {
color: @blue-3;
}
&-prefix-icon {
Expand Down

1 comment on commit f7adba3

@vercel
Copy link

@vercel vercel bot commented on f7adba3 Dec 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.