added transition on toggle folder

without transition it was looking odd and now it's smooth
pull/6453/head
Jatin Hemnani 5 years ago committed by GitHub
parent 0e1d54efdf
commit 44395c6027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
<script>
import File from './File.svelte';
import {slide} from 'svelte/transition'
export let expanded = false;
export let name;
export let files;
@ -13,7 +13,7 @@
<span class:expanded on:click={toggle}>{name}</span>
{#if expanded}
<ul>
<ul transition:slide={{duration:300}}>
{#each files as file}
<li>
{#if file.type === 'folder'}
@ -49,4 +49,4 @@
li {
padding: 0.2em 0;
}
</style>
</style>

Loading…
Cancel
Save