From 575480c5f5aa44f5b2a6537850f4c85fbfbd4330 Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Fri, 21 Feb 2025 12:03:33 +0100
Subject: frontend: Use transition to expand Toolbar

Also, whilst here, shorten the prop definition.
---
 frontend/src/lib/toolbar/Toolbar.svelte | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'frontend/src/lib/toolbar/Toolbar.svelte')

diff --git a/frontend/src/lib/toolbar/Toolbar.svelte b/frontend/src/lib/toolbar/Toolbar.svelte
index 9e961ed..fefc151 100644
--- a/frontend/src/lib/toolbar/Toolbar.svelte
+++ b/frontend/src/lib/toolbar/Toolbar.svelte
@@ -1,5 +1,7 @@
 <script lang="ts">
+	import { slideYDefault } from '$lib/Transitions';
 	import { type Snippet } from 'svelte';
+	import { slide } from 'svelte/transition';
 
 	export interface ToolbarState {
 		expanded: boolean;
@@ -14,7 +16,7 @@
 		expand?: boolean;
 	}
 
-	let { start, center, end, expansion, expand: expand = false }: Props = $props();
+	let { start, center, end, expansion, expand = false }: Props = $props();
 
 	let expanded = $state(expand);
 
@@ -38,7 +40,7 @@
 		</div>
 	</div>
 	{#if expanded}
-		<div class="mt-4">
+		<div class="mt-4" transition:slide={slideYDefault}>
 			{@render expansion?.()}
 		</div>
 	{/if}
-- 
cgit v1.2.3-2-gb3c3

