Skip to content

Commit

Permalink
Merge pull request #45454 from software-mansion-labs/filip-solecki/se…
Browse files Browse the repository at this point in the history
…lection-mode-fix-text-wrap

[CP Staging] Fix text wrapping when no option to select
  • Loading branch information
MonilBhavsar authored Jul 16, 2024
2 parents 307565a + fe9186e commit cb1e9bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Search/SearchPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function SearchPageHeader({query, selectedItems = {}, hash, clearSelectedItems,
iconHeight: variables.iconSizeLarge,
iconWidth: variables.iconSizeLarge,
numberOfLinesTitle: 2,
titleStyle: {...styles.colorMuted, ...styles.fontWeightNormal},
titleStyle: {...styles.colorMuted, ...styles.fontWeightNormal, ...styles.textWrap},
};

options.push({
Expand All @@ -129,6 +129,7 @@ function SearchPageHeader({query, selectedItems = {}, hash, clearSelectedItems,
theme.icon,
styles.colorMuted,
styles.fontWeightNormal,
styles.textWrap,
]);

if (isSmallScreenWidth) {
Expand Down
3 changes: 3 additions & 0 deletions src/pages/Search/SearchSelectedNarrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ function SearchSelectedNarrow({options, itemsLength}: SearchSelectedNarrowProps)
>
{options.map((option, index) => (
<MenuItem
// eslint-disable-next-line react/jsx-props-no-spreading
{...option}
title={option.text}
titleStyle={option.titleStyle}
icon={option.icon}
onPress={() => handleOnMenuItemPress(option, index)}
key={option.value}
Expand Down
4 changes: 4 additions & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ const styles = (theme: ThemeColors) =>
textAlign: 'center',
},

textWrap: {
...whiteSpace.preWrap,
},

textNoWrap: {
...whiteSpace.noWrap,
},
Expand Down

0 comments on commit cb1e9bc

Please sign in to comment.