Skip to content

Commit

Permalink
Merge pull request #45134 from bernhardoj/fix/44608-breadcrumb-header…
Browse files Browse the repository at this point in the history
…-text-cut-off

Fix breadcrumb title text is cut off
  • Loading branch information
pecanoro authored Jul 11, 2024
2 parents 105dce5 + 889f576 commit cbd7d39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ function Breadcrumbs({breadcrumbs, style}: BreadcrumbsProps) {
const theme = useTheme();
const styles = useThemeStyles();
const [primaryBreadcrumb, secondaryBreadcrumb] = breadcrumbs;
const isRootBreadcrumb = primaryBreadcrumb.type === CONST.BREADCRUMB_TYPE.ROOT;
const fontScale = PixelRatio.getFontScale() > CONST.LOGO_MAX_SCALE ? CONST.LOGO_MAX_SCALE : PixelRatio.getFontScale();
return (
<View style={[styles.flexRow, styles.alignItemsCenter, styles.gap1, styles.w100, styles.breadcrumsContainer, style]}>
{primaryBreadcrumb.type === CONST.BREADCRUMB_TYPE.ROOT ? (
{isRootBreadcrumb ? (
<View style={styles.breadcrumbLogo}>
<Header
title={
Expand Down Expand Up @@ -68,7 +69,7 @@ function Breadcrumbs({breadcrumbs, style}: BreadcrumbsProps) {
<Text style={[styles.breadcrumbSeparator]}>/</Text>
<Text
numberOfLines={1}
style={[styles.mw75, styles.flexShrink0, styles.breadcrumb, styles.flex1]}
style={[styles.mw75, styles.breadcrumb, isRootBreadcrumb ? styles.flex1 : styles.flexShrink0]}
>
{secondaryBreadcrumb.text}
</Text>
Expand Down

0 comments on commit cbd7d39

Please sign in to comment.