refactor: remove useless div tag

This commit is contained in:
Eric Liu 2022-03-12 14:09:17 -08:00
commit 00e1ed69c6

View file

@ -54,8 +54,7 @@
}}"
/>
<div>
<button
<button
bind:this="{ref}"
type="button"
class:bx--header__action="{true}"
@ -67,7 +66,7 @@
isOpen = !isOpen;
dispatch(isOpen ? 'open' : 'close');
}}"
>
>
<svelte:component this="{icon}" style="{isOpen ? 'display: none' : ''}" />
<svelte:component
this="{closeIcon}"
@ -76,8 +75,8 @@
<slot name="text">
{#if text}<span>{text}</span>{/if}
</slot>
</button>
{#if isOpen}
</button>
{#if isOpen}
<div
bind:this="{refPanel}"
class:bx--header-panel="{true}"
@ -89,8 +88,7 @@
>
<slot />
</div>
{/if}
</div>
{/if}
<style>
.action-text {