svelte-routing icon indicating copy to clipboard operation
svelte-routing copied to clipboard

Pass existing props to Link.getProps

Open cfal opened this issue 3 years ago • 0 comments

Hi, please take a look and let me knows if this makes sense to land :)

This adds a fifth field existingProps to getProps, which passes down the existing props defined on the Link element. This seems to make Link-based components a bit more reuseable since now we can keep existing props that are passed down (eg. <NavLink class="nav-item"> could simply append active to the existing classes). I updated the example to clarify.

Thanks!

cfal avatar Jun 11 '21 18:06 cfal