mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
refactor: Update Collapsible component to include dynamic margin for open state
This commit is contained in:
parent
db58bb5f0f
commit
78ba18a680
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@
|
|||
<button on:click={() => (open = !open)}>
|
||||
<slot name="head" />
|
||||
</button>
|
||||
<div bind:this={contentElement} class="collapsible-content" style="max-height: {maxHeight};">
|
||||
<div bind:this={contentElement} class={`collapsible-content ${open ? 'mt-1' : '!mt-0'}`} style="max-height: {maxHeight};">
|
||||
<slot name="content" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
<style>
|
||||
.collapsible-content {
|
||||
overflow: hidden;
|
||||
transition: max-height 0.3s ease-out;
|
||||
transition: all 0.3s ease-out;
|
||||
max-height: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in a new issue