Skip to content

Commit

Permalink
fix: hide expand icon in global navigation lists (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
jared-dickman authored Mar 25, 2024
1 parent 5eaec9e commit edd21db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/navigation/GlobalNavigation/NavigationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function NavigationList(props: INavigationListProps) {
{props.items.map((item, i) => (
<Fragment key={i}>
{item.type === 'menu' ? (
<Menu key={i} className="globalNavigation__menu" items={[generateMenuItem(item, i)]} />
<Menu key={i} expandIcon={null} className="globalNavigation__menu" items={[generateMenuItem(item, i)]} />
) : (
<NavigationItem {...item} type="link" key={i} />
)}
Expand All @@ -37,6 +37,7 @@ function generateMenuItem(item: IGlobalNavigationItem, i: number) {
children.push(
...item.children.map((linkItem, j) => ({
...linkItem,
expandIcon: null,
key: `${String(linkItem.label)}${j}`,
label: buildLinkFromHrefOptions(linkItem.label, linkItem.hrefOptions),
})),
Expand All @@ -58,4 +59,4 @@ function generateMenuItem(item: IGlobalNavigationItem, i: number) {
key: `${String(item.label)}${i}`,
children,
}
}
}

0 comments on commit edd21db

Please sign in to comment.