forked from open-webui/open-webui
		
	refac: transition
This commit is contained in:
		
							parent
							
								
									df21a92542
								
							
						
					
					
						commit
						3e0aa29683
					
				
					 4 changed files with 11 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -2,6 +2,8 @@
 | 
			
		|||
	import { DropdownMenu } from 'bits-ui';
 | 
			
		||||
	import { createEventDispatcher } from 'svelte';
 | 
			
		||||
 | 
			
		||||
	import { flyAndScale } from '$lib/utils/transitions';
 | 
			
		||||
 | 
			
		||||
	const dispatch = createEventDispatcher();
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -20,6 +22,7 @@
 | 
			
		|||
			sideOffset={8}
 | 
			
		||||
			side="bottom"
 | 
			
		||||
			align="start"
 | 
			
		||||
			transition={flyAndScale}
 | 
			
		||||
		>
 | 
			
		||||
			<DropdownMenu.Item class="flex items-center px-3 py-2 text-sm  font-medium">
 | 
			
		||||
				<div class="flex items-center">Profile</div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,8 @@
 | 
			
		|||
	import { onMount } from 'svelte';
 | 
			
		||||
	import { fade } from 'svelte/transition';
 | 
			
		||||
 | 
			
		||||
	import { flyAndScale } from '$lib/utils/transitions';
 | 
			
		||||
 | 
			
		||||
	export let show = true;
 | 
			
		||||
	export let size = 'md';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -41,10 +43,10 @@
 | 
			
		|||
		}}
 | 
			
		||||
	>
 | 
			
		||||
		<div
 | 
			
		||||
			class=" modal-content m-auto rounded-2xl max-w-full {sizeToWidth(
 | 
			
		||||
			class=" m-auto rounded-2xl max-w-full {sizeToWidth(
 | 
			
		||||
				size
 | 
			
		||||
			)} mx-2 bg-gray-50 dark:bg-gray-900 shadow-3xl"
 | 
			
		||||
			in:fade={{ duration: 10 }}
 | 
			
		||||
			in:flyAndScale
 | 
			
		||||
			on:click={(e) => {
 | 
			
		||||
				e.stopPropagation();
 | 
			
		||||
			}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue