Skip to content

Instantly share code, notes, and snippets.

@skflowne
Last active August 4, 2020 21:27
Show Gist options
  • Save skflowne/202a14467445bb7c51d424bddd42929f to your computer and use it in GitHub Desktop.
Save skflowne/202a14467445bb7c51d424bddd42929f to your computer and use it in GitHub Desktop.
<script lang="ts">
import type { File } from "../../interfaces/file.interface"
import FileItem from "./FileItem.svelte"
export let files: File[] = []
</script>
<div class="w-4/5 mx-auto">
{#if files.length > 0}
{#each files as file (file.id)}
<FileItem {file} />
{/each}
{:else}
<div>
<h3>No matching files found</h3>
</div>
{/if}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment