Last active
August 5, 2020 00:09
-
-
Save skflowne/078466459b47f70a4b9cda919ef12fb5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script lang="ts"> | |
| import type { File } from "../../interfaces/file.interface" | |
| import FileItem from "./FileItem.svelte" | |
| import fileIndex from "../../store/fileIndex" | |
| export let searching: boolean = false | |
| export let files: File[] = [] | |
| </script> | |
| <div class="w-4/5 mx-auto"> | |
| {#if files.length > 0} | |
| {#each files as file, index (file.id)} | |
| <FileItem active={searching && index === $fileIndex} {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