From 46c3fe3354582840c01ca64562af86733c13cf44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Fri, 18 Nov 2022 11:48:00 -0300 Subject: [PATCH] Extract cards to external component --- src/lib/CanvasCard.svelte | 41 +++++++++++++++++++++++++++++++++++++++ src/lib/FileViewer.svelte | 33 ++----------------------------- 2 files changed, 43 insertions(+), 31 deletions(-) create mode 100644 src/lib/CanvasCard.svelte diff --git a/src/lib/CanvasCard.svelte b/src/lib/CanvasCard.svelte new file mode 100644 index 0000000..5154225 --- /dev/null +++ b/src/lib/CanvasCard.svelte @@ -0,0 +1,41 @@ + + +{#each Array.from(files) as file, i} +
+ +

{file.name}

+
+ {canvasRefs[i] && startFileRead(file, canvasRefs[i])} +{/each} + + diff --git a/src/lib/FileViewer.svelte b/src/lib/FileViewer.svelte index e4daf08..2b5d9ea 100644 --- a/src/lib/FileViewer.svelte +++ b/src/lib/FileViewer.svelte @@ -1,9 +1,8 @@