fix Menu component

This commit is contained in:
Keviin Åberg Kultalahti 2021-04-21 14:51:17 +02:00
parent f690adc552
commit b9f5868fb3
1 changed files with 6 additions and 8 deletions

View File

@ -4,12 +4,10 @@
</script>
<li on:click|preventDefault class="spectrum-Menu-item" class:is-disabled={disabled} role="menuitem" tabindex="0">
<span class="spectrum-Menu-itemLabel">
{#if icon}
<svg class="spectrum-Icon spectrum-Icon--sizeM spectrum-Menu-itemIcon" focusable="false" aria-hidden="true" aria-label={icon}>
<use xlink:href="#spectrum-icon-18-{icon}"></use>
</svg>
{/if}
<span class="spectrum-Menu-itemLabel"><slot /></span>
</span>
{#if icon}
<svg class="spectrum-Icon spectrum-Icon--sizeM spectrum-Menu-itemIcon" focusable="false" aria-hidden="true" aria-label={icon}>
<use xlink:href="#spectrum-icon-18-{icon}"></use>
</svg>
{/if}
<span class="spectrum-Menu-itemLabel"><slot /></span>
</li>