Skip to content

Commit

Permalink
handle comments
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts committed Apr 4, 2024
1 parent c5e509b commit 64c2a45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/HighlightableMenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {ForwardedRef} from 'react';
import {forwardRef} from 'react';
import React, {forwardRef} from 'react';
import type {View} from 'react-native';
import {StyleSheet} from 'react-native';
import useAnimatedHighlightStyle from '@hooks/useAnimatedHighlightStyle';
Expand All @@ -8,6 +8,7 @@ import MenuItem from './MenuItem';
import type {MenuItemProps} from './MenuItem';

type Props = MenuItemProps & {
/** Should the menu item be highlighted? */
highlighted?: boolean;
};

Expand All @@ -25,7 +26,7 @@ function HighlightableMenuItem({wrapperStyle, highlighted, ...restOfProps}: Prop
<MenuItem
// eslint-disable-next-line react/jsx-props-no-spreading
{...restOfProps}
wrapperStyle={animatedHighlightStyle}
outerWrapperStyle={animatedHighlightStyle}
ref={ref}
/>
);
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/useAnimatedHighlightStyle/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {isMobile} from '@libs/Browser';

// It takes varying amount of time to navigate to a new page on mobile and desktop
// This variable takes that into account
const DELAY_FACTOR = isMobile() ? 1 : 0.2;
export default {};

Expand Down

0 comments on commit 64c2a45

Please sign in to comment.