fix: segmented hover style (#37498)

* fix: segmented hover

* chore: optimization

* chore: fix logical prop
This commit is contained in:
MadCcc 2022-09-09 17:04:15 +08:00 committed by GitHub
parent 8e328d0ae2
commit 68bd866187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,9 +92,19 @@ const genSegmentedStyle: GenerateStyle<SegmentedToken> = (token: SegmentedToken)
color: token.labelColorHover, color: token.labelColorHover,
}, },
'&:hover, &:focus': { [`&:hover:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {
color: token.labelColorHover, color: token.labelColorHover,
backgroundColor: token.bgColorHover,
'&::after': {
content: '""',
position: 'absolute',
width: '100%',
height: '100%',
top: 0,
insetInlineStart: 0,
borderRadius: token.controlRadiusSM,
backgroundColor: token.bgColorHover,
},
}, },
'&-label': { '&-label': {
@ -160,6 +170,7 @@ const genSegmentedStyle: GenerateStyle<SegmentedToken> = (token: SegmentedToken)
width: 0, width: 0,
height: '100%', height: '100%',
padding: `${token.paddingXXS}px 0`, padding: `${token.paddingXXS}px 0`,
borderRadius: token.controlRadiusSM,
}, },
// transition effect when `appear-active` // transition effect when `appear-active`