Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
78ba18a6
Commit
78ba18a6
authored
Jul 04, 2024
by
rdavis
Browse files
refactor: Update Collapsible component to include dynamic margin for open state
parent
db58bb5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/lib/components/common/Collapsible.svelte
src/lib/components/common/Collapsible.svelte
+2
-2
No files found.
src/lib/components/common/Collapsible.svelte
View file @
78ba18a6
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment