Don't render expandable content unless expanded

This commit is contained in:
2023-10-11 19:47:47 +02:00
parent 942f7c7888
commit 5bd26ce5bc

View File

@@ -49,9 +49,11 @@ export let highlight = false
{/if} {/if}
</button> </button>
</div> </div>
<div class="body" class:hidden={!expanded}> {#if expanded}
<div class="body">
<slot></slot> <slot></slot>
</div> </div>
{/if}
</div> </div>
<style> <style>
@@ -90,7 +92,4 @@ export let highlight = false
text-decoration: none; text-decoration: none;
border-top: 1px solid var(--separator); border-top: 1px solid var(--separator);
} }
.hidden {
display: none;
}
</style> </style>