Skip to content

Commit fed526c

Browse files
HerrTopibalzss
authored andcommitted
fix(ui-options,ui-menu): improve hover animations
INSTUI-4502
1 parent b501a7b commit fed526c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/ui-menu/src/Menu/MenuItem/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ const generateStyle = (
103103
...roleStyles,
104104
'&:focus, &:active, &:hover': {
105105
background: componentTheme.activeBackground,
106+
transition: 'background 0s',
106107
'[class*="menuItem__label"]': {
107108
color: componentTheme.activeLabelColor
108109
},

packages/ui-options/src/Options/Item/styles.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ const generateStyle = (
7070
cursor: 'not-allowed',
7171
opacity: 0.5
7272
},
73-
default: {}
73+
default: {
74+
transition: 'background 200ms'
75+
}
7476
}
7577

7678
const getContentVAlign = (type: 'before' | 'after') => {
@@ -101,8 +103,6 @@ const generateStyle = (
101103

102104
const linkStyles = { textDecoration: 'none', color: 'currentColor' }
103105

104-
const transition = 'background 200ms'
105-
106106
return {
107107
item: {
108108
label: 'optionItem',
@@ -118,7 +118,6 @@ const generateStyle = (
118118
lineHeight: componentTheme.lineHeight,
119119
outline: 'none',
120120
position: 'relative',
121-
transition,
122121
userSelect: 'none',
123122
...variantVariants[variant!],
124123
...(containsList && { cursor: 'default' }),
@@ -188,7 +187,6 @@ const generateStyle = (
188187
description: {
189188
label: 'optionItem__description',
190189
display: 'block',
191-
transition,
192190
paddingBlockStart: componentTheme.descriptionPaddingStart,
193191
fontWeight: componentTheme.descriptionFontWeight,
194192
fontSize: componentTheme.descriptionFontSize,

0 commit comments

Comments
 (0)