Add fade to DND position indicators

This commit is contained in:
Andrew Kingston 2022-05-23 11:52:50 +01:00
parent 0842d78e72
commit 16f35cff38
1 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,6 @@
<script> <script>
import { DropPosition } from "./dndStore" import { DropPosition } from "./dndStore"
import { fade } from "svelte/transition"
export let component export let component
export let position export let position
@ -28,6 +29,7 @@
{#if component && position} {#if component && position}
<div <div
in:fade={{ duration: 130 }}
class:above={position === DropPosition.ABOVE} class:above={position === DropPosition.ABOVE}
class:below={position === DropPosition.BELOW} class:below={position === DropPosition.BELOW}
class:inside={position === DropPosition.INSIDE} class:inside={position === DropPosition.INSIDE}