Don't render expandable content unless expanded
This commit is contained in:
@@ -49,9 +49,11 @@ export let highlight = false
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
<div class="body" class:hidden={!expanded}>
|
||||
{#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