Skip to content

Commit 62c843f

Browse files
authored
Merge pull request Expensify#68849 from thelullabyy/fix/68212-tooltip-is-shown-when-hovered-over
Merge expense - Tooltip is shown when hovered over category when category is not truncated
2 parents 8e2ad54 + 9f561d4 commit 62c843f

1 file changed

Lines changed: 14 additions & 21 deletions

File tree

src/components/SelectionList/Search/TextWithIconCell.tsx

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import React from 'react';
22
import {View} from 'react-native';
33
import type {StyleProp, TextStyle} from 'react-native';
44
import Icon from '@components/Icon';
5-
import Text from '@components/Text';
6-
import Tooltip from '@components/Tooltip';
5+
import TextWithTooltip from '@components/TextWithTooltip';
76
import useTheme from '@hooks/useTheme';
87
import useThemeStyles from '@hooks/useThemeStyles';
98
import type IconAsset from '@src/types/utils/IconAsset';
@@ -24,24 +23,18 @@ export default function TextWithIconCell({icon, text, showTooltip, textStyle}: T
2423
}
2524

2625
return (
27-
<Tooltip
28-
shouldRender={showTooltip}
29-
text={text}
30-
>
31-
<View style={[styles.flexRow, styles.flexShrink1, styles.gap1]}>
32-
<Icon
33-
src={icon}
34-
fill={theme.icon}
35-
height={12}
36-
width={12}
37-
/>
38-
<Text
39-
numberOfLines={1}
40-
style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textMicro, styles.textSupporting, styles.flexShrink1, textStyle]}
41-
>
42-
{text}
43-
</Text>
44-
</View>
45-
</Tooltip>
26+
<View style={[styles.flexRow, styles.flexShrink1, styles.gap1]}>
27+
<Icon
28+
src={icon}
29+
fill={theme.icon}
30+
height={12}
31+
width={12}
32+
/>
33+
<TextWithTooltip
34+
text={text}
35+
shouldShowTooltip={showTooltip}
36+
style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textMicro, styles.textSupporting, styles.flexShrink1, textStyle]}
37+
/>
38+
</View>
4639
);
4740
}

0 commit comments

Comments
 (0)