From 764c046fbcc95a4b85344de07f7923267c6ff617 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Tue, 19 Nov 2019 11:45:32 +0800 Subject: [PATCH] tweak: active and hover background color --- components/mentions/style/index.less | 2 +- components/style/themes/default.less | 8 ++++---- components/transfer/ListItem.tsx | 1 + components/transfer/style/index.less | 4 ++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/components/mentions/style/index.less b/components/mentions/style/index.less index 143a0673f3..235d2a9913 100644 --- a/components/mentions/style/index.less +++ b/components/mentions/style/index.less @@ -156,7 +156,7 @@ } &-active { - background-color: @item-active-bg; + background-color: @item-hover-bg; } } } diff --git a/components/style/themes/default.less b/components/style/themes/default.less index ef5b1d168b..31e1401bdb 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -79,7 +79,7 @@ // The background colors for active and hover states for things like // list items or table cells. -@item-active-bg: #f5f5f5; +@item-active-bg: @primary-1; @item-hover-bg: #f5f5f5; // ICONFONT @@ -342,7 +342,7 @@ @select-item-selected-font-weight: 600; @select-dropdown-bg: @component-background; @select-item-selected-bg: @blue-1; -@select-item-active-bg: @item-active-bg; +@select-item-active-bg: @item-hover-bg; @select-background: @component-background; // Cascader @@ -411,7 +411,7 @@ @menu-popup-bg: @component-background; @menu-item-color: @text-color; @menu-highlight-color: @primary-color; -@menu-item-active-bg: @item-active-bg; +@menu-item-active-bg: @primary-1; @menu-item-active-border-width: 3px; @menu-item-group-title-color: @text-color-secondary; @menu-icon-size: @font-size-base; @@ -465,7 +465,7 @@ // --- @time-picker-panel-column-width: 56px; @time-picker-panel-width: @time-picker-panel-column-width * 3; -@time-picker-selected-bg: @background-color-base; +@time-picker-selected-bg: @item-active-bg; // Carousel // --- diff --git a/components/transfer/ListItem.tsx b/components/transfer/ListItem.tsx index 3f6e73cbe0..4f446e182d 100644 --- a/components/transfer/ListItem.tsx +++ b/components/transfer/ListItem.tsx @@ -24,6 +24,7 @@ export default class ListItem extends React.Component { const className = classNames({ [`${prefixCls}-content-item`]: true, [`${prefixCls}-content-item-disabled`]: disabled || item.disabled, + [`${prefixCls}-content-item-checked`]: checked, }); let title: string | undefined; diff --git a/components/transfer/style/index.less b/components/transfer/style/index.less index 0b3b8ac9a3..f21669d911 100644 --- a/components/transfer/style/index.less +++ b/components/transfer/style/index.less @@ -130,6 +130,10 @@ cursor: pointer; } + &-item-checked { + background-color: @item-active-bg; + } + &-item-disabled { color: @btn-disable-color; cursor: not-allowed;