Skip to content

Commit

Permalink
Merge pull request #951 from DTS-STN/153455-breadcrumb
Browse files Browse the repository at this point in the history
153455 - Breadcrumbs fix
  • Loading branch information
MarcoGoC authored Nov 23, 2023
2 parents 74617c9 + 8d5880b commit 0e95cf8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
21 changes: 12 additions & 9 deletions components/Layout/Breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react'
import Link from 'next/link'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faChevronRight as solidChevronRight } from '@fortawesome/free-solid-svg-icons'

export interface BreadcrumbItem {
text: string
Expand All @@ -20,19 +18,24 @@ export function Breadcrumb({ locale, items = [] }: BreadcrumbProps) {
{items.map((item, index) => (
<li
key={item.link}
className="inline-block min-w-0 max-w-full truncate -my-4 px-1"
className="inline-block min-w-0 max-w-full truncate -my-4"
>
<FontAwesomeIcon
icon={solidChevronRight}
className={`${
index === 0 ? 'hidden' : ''
} h-[8px] w-[8px] py-[2px] pr-[4px]`}
/>
<Link href={item.link} locale={locale}>
<a className="font-sans text-[16px] leading-[23px] font-[400] text-[#295376] hover:text-[#0535D2] underline">
{item.text}
</a>
</Link>

{index < items.length - 1 && (
<span className="ml-2 mr-1 inline-block align-middle text-multi-blue-blue70b icoxxxn-cheveron-right">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
id={`chevron-${index}`}
src={'/chevron-right.svg'}
alt=""
/>
</span>
)}
</li>
))}
</ul>
Expand Down
1 change: 1 addition & 0 deletions public/chevron-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0e95cf8

Please sign in to comment.