Skip to content

Commit

Permalink
Added Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MuaazArshad committed Nov 8, 2024
1 parent 1553b76 commit 638f6bb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/styles/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,13 +1119,14 @@ function getAmountWidth(amount: string): number {
return width;
}

/**
* When the item is selected and disabled, We want selected item styles.
* When the item is focused and disabled, We want disabled item styles.
* Single true value will give result accordingly.
*/
function getItemBackgroundColorStyle(isSelected: boolean, isFocused: boolean, isDisabled: boolean, selectedBG: string, focusedBG: string): ViewStyle {
let backgroundColor;
/**
* When the item is selected and disabled, We want selected item styles.
* When the item is focused and disabled, We want disabled item styles.
* Single true value will give result accordingly.
*/

if (isSelected) {
backgroundColor = selectedBG;
} else if (isDisabled) {
Expand Down

0 comments on commit 638f6bb

Please sign in to comment.