Decathlon / vitamin-web

Decathlon Design System UI components for web applications
https://decathlon.github.io/vitamin-web
Apache License 2.0
279 stars 77 forks source link

fix(@vtmn/svelte, @vtmn/react, @vtmn/vue): `VtmnNavbar` slots #1431

Closed Mig-l closed 1 year ago

Mig-l commented 1 year ago

Changes description

1- VtmnNavBar

The logo link should not be part of the component but rather come from the slot. Currently, we cannot track the click on the logo, etc...

2- VtmnNavBarLink

Events on the a tag do not go back to the parent. $$restProps does not forward events, you have to add them. I refactored in relation to the "showLabel" variable and I added an "if" around the icon

Context

Checklist

Does this introduce a breaking change?

Other information

lauthieb commented 1 year ago

Hi @Mig-l, thanks for your help.

In order to avoid several bump with a major version, I propose to merge your PR to the PR https://github.com/Decathlon/vitamin-web/pull/1425 of @Tlahey hosted in feat/vtmnNavbarLink-enhancement-ssr git branch. That's why I changed the target branch from main to feat/vtmnNavbarLink-enhancement-ssr.`

Can you please apply its suggestions & also do the same job for Vue & React implementations?

Thank you!

thibault-mahe commented 1 year ago

It's ok for me, thanks a lot @Mig-l :)