feat(UIShell): export ref for all UIShell components

This commit is contained in:
josefaidt 2020-10-01 15:13:40 -05:00
commit d1e9fc7225
11 changed files with 82 additions and 5 deletions

View file

@ -4,10 +4,22 @@
* @type {string} [href]
*/
export let href = undefined;
/**
* Obtain a reference to the HTML button element
* @type {null | HTMLButtonElement} [ref=null]
*/
export let ref = null;
</script>
<li class:bx--switcher__item="{true}">
<a href="{href}" class:bx--switcher__item-link="{true}" {...$$restProps} on:click>
<a
bind:this="{ref}"
href="{href}"
class:bx--switcher__item-link="{true}"
{...$$restProps}
on:click
>
<slot />
</a>
</li>