feat: make icons slottable

This commit is contained in:
Eric Liu 2022-03-19 11:30:51 -07:00
commit 8591c592fe
7 changed files with 48 additions and 19 deletions

View file

@ -245,7 +245,9 @@
>
{#if indented}
<div class:bx--menu-option__icon="{true}">
<svelte:component this="{icon}" />
<slot name="icon">
<svelte:component this="{icon}" />
</slot>
</div>
{/if}
<span class:bx--menu-option__label="{true}" title="{labelText}">
@ -268,7 +270,9 @@
>
{#if indented}
<div class:bx--menu-option__icon="{true}">
<svelte:component this="{icon}" />
<slot name="icon">
<svelte:component this="{icon}" />
</slot>
</div>
{/if}
<span class:bx--menu-option__label="{true}" title="{labelText}">