mirror of
https://github.com/open-webui/open-webui
synced 2025-05-24 14:54:33 +00:00
19 lines
396 B
Svelte
19 lines
396 B
Svelte
<script lang="ts">
|
|
import { slide } from 'svelte/transition';
|
|
import { quintOut } from 'svelte/easing';
|
|
export let open = false;
|
|
export let className = '';
|
|
</script>
|
|
|
|
<div class={className}>
|
|
<button on:click={() => (open = !open)}>
|
|
<slot />
|
|
</button>
|
|
|
|
{#if open}
|
|
<div transition:slide={{ duration: 300, easing: quintOut, axis: 'y' }}>
|
|
<slot name="content" />
|
|
</div>
|
|
{/if}
|
|
</div>
|