Skip to content

Commit

Permalink
chore: the breadcrumb separator moved outside link
Browse files Browse the repository at this point in the history
  • Loading branch information
scar055 committed Jun 5, 2024
1 parent b470977 commit 83ae3f5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/ui/src/components/Breadcrumb/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ export const Breadcrumbs = ({ links, Link = UtrechtLink, backLink, breakpoint =
links.map(({ href, label, current }: any, index: number) =>
label ? (
<Fragment key={`${href}-${index}`}>
{links.length === 1 && label?.toLowerCase() !== 'home' && (
<BreadcrumbNavSeparator>
<UtrechtIconChevronLeft />
</BreadcrumbNavSeparator>
)}
<BreadcrumbNavLink
className={css('utrecht-link', 'utrecht-link--html-a', 'utrecht-breadcrumb-nav__link-custom')}
href={href}
Expand All @@ -71,18 +76,13 @@ export const Breadcrumbs = ({ links, Link = UtrechtLink, backLink, breakpoint =
current={current}
Link={UtrechtLink}
>
{links.length === 1 && label?.toLowerCase() !== 'home' && (
<BreadcrumbNavSeparator>
<UtrechtIconChevronLeft />
</BreadcrumbNavSeparator>
)}
{label}
{index !== links.length - 1 && (
<BreadcrumbNavSeparator>
<UtrechtIconChevronRight />
</BreadcrumbNavSeparator>
)}
</BreadcrumbNavLink>
{index !== links.length - 1 && (
<BreadcrumbNavSeparator>
<UtrechtIconChevronRight />
</BreadcrumbNavSeparator>
)}
</Fragment>
) : null,
)}
Expand Down

0 comments on commit 83ae3f5

Please sign in to comment.