Don't render expandable content unless expanded
This commit is contained in:
@@ -43,15 +43,17 @@ export let highlight = false
|
||||
|
||||
<button class="bucket_expand" on:click|stopPropagation={toggle}>
|
||||
{#if expanded}
|
||||
<i class="icon">expand_less</i>
|
||||
<i class="icon">expand_less</i>
|
||||
{:else}
|
||||
<i class="icon">expand_more</i>
|
||||
<i class="icon">expand_more</i>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
<div class="body" class:hidden={!expanded}>
|
||||
<slot></slot>
|
||||
</div>
|
||||
{#if expanded}
|
||||
<div class="body">
|
||||
<slot></slot>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@@ -90,7 +92,4 @@ export let highlight = false
|
||||
text-decoration: none;
|
||||
border-top: 1px solid var(--separator);
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user