feat(sidebar) : hover texte m-primary sur les liens de navigation

Les liens passent le texte en m-primary au survol (hover:text-m-primary),
en plus du fond hover:bg-m-surface existant. Inclut l'alignement du test de
largeur sur la valeur actuelle (w-[232px]).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-19 09:25:23 +02:00
parent cddd174876
commit f2489a7ab0
3 changed files with 9 additions and 2 deletions
+7 -1
View File
@@ -62,7 +62,7 @@ describe('MalioSidebar', () => {
it('renders expanded by default', () => {
const wrapper = mountComponent({sections})
const aside = wrapper.find('aside')
expect(aside.classes()).toContain('w-[280px]')
expect(aside.classes()).toContain('w-[232px]')
})
it('renders section labels with icons when expanded', () => {
@@ -89,6 +89,12 @@ describe('MalioSidebar', () => {
expect(links[2].attributes('href')).toBe('/fournisseurs')
})
it('applique un hover primary sur le texte des liens', () => {
const wrapper = mountComponent({sections})
const link = wrapper.find('a')
expect(link.classes()).toContain('hover:text-m-primary')
})
it('renders section icons via IconifyIcon', () => {
const wrapper = mountComponent({sections})
const icons = wrapper.findAllComponents(IconifyIcon)
+1 -1
View File
@@ -54,7 +54,7 @@
<NuxtLink
:to="item.to"
:class="twMerge(
'block truncate rounded-md text-[15px] text-m-text text-black transition-colors hover:bg-m-surface leading-[150%]',
'block truncate rounded-md text-[15px] text-m-text text-black transition-colors hover:bg-m-surface hover:text-m-primary leading-[150%]',
collapsed ? 'px-3 text-center' : 'pl-[32px]',
)"
>