feat: tag support status color (#3166)

pull/3173/head
zkwolf 4 years ago committed by GitHub
parent f3063e00c0
commit 17454b2cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -487,6 +487,7 @@
@tag-default-bg: @background-color-light; @tag-default-bg: @background-color-light;
@tag-default-color: @text-color; @tag-default-color: @text-color;
@tag-font-size: @font-size-sm; @tag-font-size: @font-size-sm;
@tag-line-height: 20px;
// TimePicker // TimePicker
// --- // ---

@ -11,7 +11,7 @@
margin-right: 8px; margin-right: 8px;
padding: 0 7px; padding: 0 7px;
font-size: @tag-font-size; font-size: @tag-font-size;
line-height: 20px; line-height: @tag-line-height;
white-space: nowrap; white-space: nowrap;
background: @tag-default-bg; background: @tag-default-bg;
border: @border-width-base @border-style-base @border-color-base; border: @border-width-base @border-style-base @border-color-base;
@ -64,6 +64,7 @@
&-checkable { &-checkable {
background-color: transparent; background-color: transparent;
border-color: transparent; border-color: transparent;
cursor: pointer;
&:not(&-checked):hover { &:not(&-checked):hover {
color: @primary-color; color: @primary-color;
} }
@ -102,5 +103,27 @@
} }
} }
.make-status-color-classes(@color, @status) {
@lightColor: '@{color}-1';
@lightBorderColor: '@{color}-3';
@darkColor: '@{color}-6';
&-@{status} {
color: @@darkColor;
background: @@lightColor;
border-color: @@lightBorderColor;
}
}
.make-color-classes(); .make-color-classes();
.make-status-color-classes('green', success);
.make-status-color-classes('blue', processing);
.make-status-color-classes('red', error);
.make-status-color-classes('orange', warning);
// To ensure that a space will be placed between character and `Icon`.
> .@{iconfont-css-prefix} + span,
> span + .@{iconfont-css-prefix} {
margin-left: 7px;
}
} }

Loading…
Cancel
Save