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

feat(`vtmn/svelte`): change `vtmnChip` in order to set a different type of node #1479

Closed Tlahey closed 8 months ago

Tlahey commented 8 months ago

Changes description

Switch the default div element to a svelte:element with by default div value Add the restProps inside the component.

Context

In some cases, the VtmnChip can be a link (for apply a filter -> redirect to a new page ...) Today, if we want to apply a chip with a redirect, we have to wrap it inside a <a> tag like that

<a>
  <VtmnChip />
</a>

But this way introduce a issue with a double focus and a bad semantic (link with a button inside) So that why I propose to move to a `

Checklist

Does this introduce a breaking change?

Other information