mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-21 20:59:20 +00:00
feat: make icons slottable
This commit is contained in:
parent
d9ee8cb2d9
commit
8591c592fe
7 changed files with 48 additions and 19 deletions
|
@ -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}">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue