Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Nov 4, 2024
1 parent 64a39d6 commit bac8c97
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/components/PopoverMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,13 @@ function PopoverMenu({
}
setFocusedIndex(menuIndex);
}}
wrapperStyle={StyleUtils.getItemBackgroundColorStyle(!!item.isSelected, focusedIndex === menuIndex, item.disabled ?? false, theme.activeComponentBG, theme.hoverComponentBG)}
wrapperStyle={StyleUtils.getItemBackgroundColorStyle(
!!item.isSelected,
focusedIndex === menuIndex,
item.disabled ?? false,
theme.activeComponentBG,
theme.hoverComponentBG,
)}
shouldRemoveHoverBackground={item.isSelected}
titleStyle={StyleSheet.flatten([styles.flex1, item.titleStyle])}
// Spread other props dynamically
Expand Down
12 changes: 10 additions & 2 deletions src/components/SelectionList/BaseListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,21 @@ function BaseListItem<TItem extends ListItem>({
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: true}}
onMouseDown={(e) => e.preventDefault()}
id={keyForList ?? ''}
style={[pressableStyle, isFocused && StyleUtils.getItemBackgroundColorStyle(!!item.isSelected, !!isFocused, item.isDisabled, theme.activeComponentBG, theme.hoverComponentBG)]}
style={[
pressableStyle,
isFocused && StyleUtils.getItemBackgroundColorStyle(!!item.isSelected, !!isFocused, item.isDisabled, theme.activeComponentBG, theme.hoverComponentBG),

Check failure on line 103 in src/components/SelectionList/BaseListItem.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Argument of type 'boolean | null | undefined' is not assignable to parameter of type 'boolean'.
]}
onFocus={onFocus}
onMouseLeave={handleMouseLeave}
tabIndex={item.tabIndex}
wrapperStyle={pressableWrapperStyle}
>
<View style={[wrapperStyle, isFocused && StyleUtils.getItemBackgroundColorStyle(!!item.isSelected, !!isFocused, item.isDisabled, theme.activeComponentBG, theme.hoverComponentBG)]}>
<View
style={[
wrapperStyle,
isFocused && StyleUtils.getItemBackgroundColorStyle(!!item.isSelected, !!isFocused, item.isDisabled, theme.activeComponentBG, theme.hoverComponentBG),

Check failure on line 113 in src/components/SelectionList/BaseListItem.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Argument of type 'boolean | null | undefined' is not assignable to parameter of type 'boolean'.
]}
>
{typeof children === 'function' ? children(hovered) : children}

{!canSelectMultiple && !!item.isSelected && !rightHandSideComponent && (
Expand Down

0 comments on commit bac8c97

Please sign in to comment.