Skip to content

Commit

Permalink
ux: adjust icon size, margins
Browse files Browse the repository at this point in the history
  • Loading branch information
loicguillois committed Jan 9, 2025
1 parent cc5cf48 commit c2ad80e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Header/SmallHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function SmallHeader() {
linkProps: {
to: link.url
},
text: <><span className={link.icon} aria-hidden="true"></span> {link.label} {link.showNewBadge && <Badge small={true} severity='success' noIcon={true} className="fr-ml-1w">Nouveau</Badge>}</>,
text: <><span className={`${link.icon} ${styles.icon}`} aria-hidden="true"></span>{link.label}{link.showNewBadge && <Badge small={true} severity='success' noIcon={true} className="fr-ml-1w fr-mr-0w">Nouveau</Badge>}</>,
isActive: location.pathname.startsWith(link.url),
};
}
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/Header/small-header.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@
height: 2px;
z-index: 1000;
}

.icon::before {
--icon-size: 1.25rem;
margin-right: 0.5rem;
position: relative;
top: -2px;
}
4 changes: 4 additions & 0 deletions frontend/src/dsfr-fix.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ span.fr-icon-checkbox-circle-line.ds-fr-tag-icon {
}
}
}

.fr-nav__list > :first-child:nth-last-child(4) ~ * {
margin-left: 0px;
}
2 changes: 1 addition & 1 deletion frontend/src/models/UserNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const getUserNavItem = (userNavItem: UserNavItems): UserNavItem => {
case UserNavItems.Resources:
return { url: '/ressources', label: 'Ressources', icon: 'fr-icon-information-line' };
case UserNavItems.Analysis:
return { url: '/analyses', label: 'Analyses', showNewBadge: true, icon: 'fr-icon-bar-chart-box-line' };
return { url: '/analyses', label: 'Analyses', showNewBadge: true, icon: 'ri-bar-chart-2-line' };
default:
return { url: '/', label: 'Accueil', icon: 'fr-icon-building-line' };
}
Expand Down

0 comments on commit c2ad80e

Please sign in to comment.