Skip to content

Commit

Permalink
fix(button): disabled style override loading style (#1812)
Browse files Browse the repository at this point in the history
Co-authored-by: maxin <maxin@growingio.com>
  • Loading branch information
nnmax and maxin committed Jan 19, 2022
1 parent 76c5961 commit f264dba
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions src/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,70 +31,73 @@
background-color: @blue-2;
.elevation(1);

&:enabled:hover,
&:hover,
&.@{button-prefix-cls}_active {
background-color: @blue-3;
.elevation(2);
}

&:disabled:not(.@{button-prefix-cls}_loading) {
color: @gray-3;
background-color: @gray-1;
cursor: not-allowed;
.elevation(none);
}

&.@{button-prefix-cls}_loading {
background-color: @blue-3;
cursor: not-allowed;
.elevation(2);
}

&.@{button-prefix-cls}_disabled {
color: @gray-3;
background-color: @gray-1;
cursor: not-allowed;
.elevation(none);
}
}

&_secondary {
color: @gray-5;
background-color: transparent;
.border(2, @gray-2);

&:enabled:hover,
&:hover,
&.@{button-prefix-cls}_active {
color: @blue-3;
background-color: @gray-1;
}

&:disabled:not(.@{button-prefix-cls}_loading) {
color: @gray-3;
background-color: transparent;
cursor: not-allowed;
}

&.@{button-prefix-cls}_loading {
color: @blue-3;
background-color: @gray-1;
cursor: not-allowed;
}

&.@{button-prefix-cls}_disabled {
color: @gray-3;
background-color: transparent;
cursor: not-allowed;
}
}

&_text {
padding: 7px 8px;
color: @gray-5;
background-color: transparent;
.border(2, transparent);
&:enabled:hover,

&:hover,
&.@{button-prefix-cls}_active {
color: @blue-3;
background-color: @gray-1;
}
&:disabled:not(.@{button-prefix-cls}_loading) {
color: @gray-3;
background-color: transparent;
cursor: not-allowed;
}

&.@{button-prefix-cls}_loading {
color: @blue-3;
background-color: @gray-1;
cursor: not-allowed;
}

&.@{button-prefix-cls}_disabled {
color: @gray-3;
background-color: transparent;
cursor: not-allowed;
}
}

&_small {
Expand Down

1 comment on commit f264dba

@vercel
Copy link

@vercel vercel bot commented on f264dba Jan 19, 2022

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.