Skip to content

Commit

Permalink
fix: display item in evidence in tertiary-menu (#644)
Browse files Browse the repository at this point in the history
* fix: display item in evidence in tertiary-menu

* fix: add inEvidence field
  • Loading branch information
giuliaghisini authored Apr 16, 2024
1 parent 7dd5bb1 commit 413e309
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import React, { useEffect } from 'react';
import cx from 'classnames';
import { useDispatch, useSelector } from 'react-redux';
import { useLocation } from 'react-router-dom';
import { Nav, NavItem, NavLink } from 'design-react-kit';
Expand All @@ -25,6 +26,7 @@ const TertiaryMenu = () => {
return {
url: item.href || flattenToAppURL(item.linkUrl?.[0]?.['@id']) || '/',
title: item.title,
inEvidence:item.inEvidence
};
});

Expand All @@ -40,7 +42,11 @@ const TertiaryMenu = () => {
return items?.length > 0 ? (
<Nav vertical={false} className="tertiary-menu">
{items.map((navitem, id) => (
<NavItem tag="li" key={id}>
<NavItem
tag="li"
key={id}
className={cx('', { 'in-evidence': navitem.inEvidence })}
>
<NavLink href={navitem.url} tag={UniversalLink}>
<span>{navitem.title}</span>
</NavLink>
Expand Down
6 changes: 6 additions & 0 deletions src/theme/ItaliaTheme/Components/_tertiaryMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
font-weight: 300;
}
}

&.in-evidence {
a {
font-weight: bold;
}
}
}
}

Expand Down

0 comments on commit 413e309

Please sign in to comment.