fix: Week style (#40801)

This commit is contained in:
二货爱吃白萝卜 2023-02-20 11:51:01 +08:00 committed by GitHub
parent da441ae35f
commit 4bb102474e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,6 +289,7 @@ const genPickerCellInnerStyle = (token: SharedPickerToken): CSSObject => {
export const genPanelStyle = (token: SharedPickerToken): CSSObject => { export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
const { const {
componentCls, componentCls,
pickerCellCls,
pickerCellInnerCls, pickerCellInnerCls,
pickerYearMonthCellWidth, pickerYearMonthCellWidth,
pickerControlIconSize, pickerControlIconSize,
@ -746,20 +747,28 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
}, },
}, },
[`&:hover td, [`&:hover td`]: {
&-range-start td, '&:before': {
background: controlItemBgHover,
},
},
[`&-range-start td,
&-range-end td, &-range-end td,
&-selected td`]: { &-selected td`]: {
'&:before': { // Rise priority to override hover style
background: colorPrimary, [`&${pickerCellCls}`]: {
}, '&:before': {
background: colorPrimary,
},
[`&${componentCls}-cell-week`]: { [`&${componentCls}-cell-week`]: {
color: new TinyColor(colorTextLightSolid).setAlpha(0.5).toHexString(), color: new TinyColor(colorTextLightSolid).setAlpha(0.5).toHexString(),
}, },
[pickerCellInnerCls]: { [pickerCellInnerCls]: {
color: colorTextLightSolid, color: colorTextLightSolid,
},
}, },
}, },