Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: WeekPicker support hover style #40772

Merged
merged 9 commits into from
Feb 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions components/date-picker/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ import {
genHoverStyle,
initInputToken,
} from '../../input/style';
import { resetComponent, roundedArrow, textEllipsis } from '../../style';
import { genCompactItemStyle } from '../../style/compact-item';
import {
initSlideMotion,
initMoveMotion,
initSlideMotion,
slideDownIn,
slideDownOut,
slideUpIn,
slideUpOut,
} from '../../style/motion';
import type { GlobalToken } from '../../theme/interface';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import type { GlobalToken } from '../../theme/interface';
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
import { resetComponent, roundedArrow, textEllipsis } from '../../style';
import { genCompactItemStyle } from '../../style/compact-item';

export interface ComponentToken {
presetsWidth: number;
Expand Down Expand Up @@ -739,11 +739,13 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
},
},

'&:hover td': {
background: controlItemBgHover,
},
// '&:hover td': {
// background: controlItemBgHover,
// },
yoyo837 marked this conversation as resolved.
Show resolved Hide resolved

[`&-selected td,
[`&:hover td,
&-range-start td,
&-range-end td,
&-selected:hover td`]: {
background: colorPrimary,

Expand All @@ -759,6 +761,10 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
color: colorTextLightSolid,
},
},

[`&-range-hover td`]: {
background: controlItemBgActive,
},
},
},

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"rc-motion": "^2.6.1",
"rc-notification": "~5.0.0",
"rc-pagination": "~3.2.0",
"rc-picker": "~3.1.1",
"rc-picker": "~3.2.1",
"rc-progress": "~3.4.1",
"rc-rate": "~2.9.0",
"rc-resize-observer": "^1.2.0",
Expand Down