Skip to content

Commit

Permalink
Merge pull request #16434 from tienifr/fix/15916-suggested-emoji-dupl…
Browse files Browse the repository at this point in the history
…icate-background-hover-and-focus

Fix/15916: Duplicate hovered and focused background in suggested emoji list
  • Loading branch information
marcochavezf authored Mar 23, 2023
2 parents 8661157 + 4ea0c71 commit ab3af32
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/styles/StyleUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -826,16 +826,22 @@ function getEmojiSuggestionItemStyle(
hovered,
currentEmojiIndex,
) {
let backgroundColor;

if (currentEmojiIndex === highlightedEmojiIndex) {
backgroundColor = themeColors.activeComponentBG;
} else if (hovered) {
backgroundColor = themeColors.hoverComponentBG;
}

return [
{
height: rowHeight,
justifyContent: 'center',
},
(currentEmojiIndex === highlightedEmojiIndex && !hovered) || hovered
? {
backgroundColor: themeColors.highlightBG,
}
: {},
backgroundColor ? {
backgroundColor,
} : {},
];
}

Expand Down

0 comments on commit ab3af32

Please sign in to comment.