Skip to content

Commit 157952b

Browse files
committed
feat(time-select): [time-select] Adapt to old components
1 parent 7ad17d8 commit 157952b

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

packages/theme/src/time-select/index.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,14 @@
4242
}
4343

4444
&:not(.disabled):hover {
45+
color: var(--tv-TimeSelect-item-hover-text-color);
4546
background-color: var(--tv-TimeSelect-item-hover-bg-color);
4647
cursor: pointer;
4748
}
49+
&.selected:not(.disabled):hover {
50+
color: var(--tv-TimeSelect-item-selected-hover-text-color);
51+
background-color: var(--tv-TimeSelect-item-select-hover-bg-color);
52+
}
4853

4954
&.disabled {
5055
color: var(--tv-TimeSelect-item-disabled-text-color);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@import '../custom.less';
2+
@time-select-prefix-cls: ~'@{css-prefix}time-select';
3+
4+
.@{time-select-prefix-cls} {
5+
// 选项悬浮背景色
6+
--tv-TimeSelect-item-hover-bg-color: #F2F5FC;
7+
// 选项悬浮色
8+
--tv-TimeSelect-item-hover-text-color: #526ECC;
9+
// 选中项字体色
10+
--tv-TimeSelect-item-selected-text-color: #FFFFFF;
11+
// 选中项悬浮字体色
12+
--tv-TimeSelect-item-selected-hover-text-color: #FFFFFF;
13+
}

packages/theme/src/time-select/vars.less

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@
1717
--tv-TimeSelect-item-font-size: var(--tv-font-size-default);
1818
// 时间选择选项左右内边距
1919
--tv-TimeSelect-item-padding-horizontal: var(--tv-space-xl);
20-
// 时间选择选项悬浮背景色
21-
--tv-TimeSelect-item-hover-bg-color: var(--tv-color-bg-hover);
22-
// 时间选择选项禁用文本色
20+
// 选项禁用文本色
2321
--tv-TimeSelect-item-disabled-text-color: var(--tv-color-text-disabled);
24-
// 时间选择选项悬浮背景色(选中项)
22+
// 选项悬浮背景色
23+
--tv-TimeSelect-item-hover-bg-color: var(--tv-color-bg-hover);
24+
// 选项悬浮字体色
25+
--tv-TimeSelect-item-hover-text-color: var(--tv-color-text);
26+
// 选中项背景色
2527
--tv-TimeSelect-item-select-hover-bg-color: var(--tv-color-bg-active);
26-
// 时间选择选项字体色(选中项)
28+
// 选中项字体色
2729
--tv-TimeSelect-item-selected-text-color: var(--tv-color-text-active);
30+
// 选中项悬浮字体色
31+
--tv-TimeSelect-item-selected-hover-text-color: var(--tv-color-text-active);
2832
// 面板高度
2933
--tv-TimeSelect-content-padding-top: var(--tv-space-md);
3034
}

0 commit comments

Comments
 (0)