Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions src/components/SelectionList/Search/TextWithIconCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from 'react';
import {View} from 'react-native';
import type {StyleProp, TextStyle} from 'react-native';
import Icon from '@components/Icon';
import Text from '@components/Text';
import Tooltip from '@components/Tooltip';
import TextWithTooltip from '@components/TextWithTooltip';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import type IconAsset from '@src/types/utils/IconAsset';
Expand All @@ -24,24 +23,18 @@ export default function TextWithIconCell({icon, text, showTooltip, textStyle}: T
}

return (
<Tooltip
shouldRender={showTooltip}
text={text}
>
<View style={[styles.flexRow, styles.flexShrink1, styles.gap1]}>
<Icon
src={icon}
fill={theme.icon}
height={12}
width={12}
/>
<Text
numberOfLines={1}
style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textMicro, styles.textSupporting, styles.flexShrink1, textStyle]}
>
{text}
</Text>
</View>
</Tooltip>
<View style={[styles.flexRow, styles.flexShrink1, styles.gap1]}>
<Icon
src={icon}
fill={theme.icon}
height={12}
width={12}
/>
<TextWithTooltip
text={text}
shouldShowTooltip={showTooltip}
style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textMicro, styles.textSupporting, styles.flexShrink1, textStyle]}
/>
</View>
);
}
Loading