Skip to content

Commit

Permalink
Merge pull request #52353 from bernhardoj/fix/52246-missing-pressed-b…
Browse files Browse the repository at this point in the history
…g-color-on-menu-items

Fix missing highlight bg color when pressing on menu item
  • Loading branch information
yuwenmemon authored Nov 12, 2024
2 parents 1c6d9ea + 1910bad commit 7b31a72
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/styles/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1125,19 +1125,19 @@ function getAmountWidth(amount: string): number {
* Single true value will give result accordingly.
*/
function getItemBackgroundColorStyle(isSelected: boolean, isFocused: boolean, isDisabled: boolean, selectedBG: string, focusedBG: string): ViewStyle {
let backgroundColor;

if (isSelected) {
backgroundColor = selectedBG;
} else if (isDisabled) {
backgroundColor = undefined;
} else if (isFocused) {
backgroundColor = focusedBG;
return {backgroundColor: selectedBG};
}

return {
backgroundColor,
};
if (isDisabled) {
return {backgroundColor: undefined};
}

if (isFocused) {
return {backgroundColor: focusedBG};
}

return {};
}

const staticStyleUtils = {
Expand Down

0 comments on commit 7b31a72

Please sign in to comment.