From cf7ad6206da9a70577e781d50fdaa4fb74f88215 Mon Sep 17 00:00:00 2001 From: mschuepbach Date: Mon, 31 Jan 2022 11:27:36 +0100 Subject: [PATCH] Refactor into components --- src/App.svelte | 86 +++++--------------------------------- src/Matrix.svelte | 31 ++++++++++++++ src/MatrixSizeInput.svelte | 16 +++++++ 3 files changed, 58 insertions(+), 75 deletions(-) create mode 100644 src/Matrix.svelte create mode 100644 src/MatrixSizeInput.svelte diff --git a/src/App.svelte b/src/App.svelte index 7541146..ae6c993 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,4 +1,7 @@ + +
+ {#each matrix as row, i} +
+ {#each row as _, j} + + {/each} +
+ {/each} +
+ + diff --git a/src/MatrixSizeInput.svelte b/src/MatrixSizeInput.svelte new file mode 100644 index 0000000..45ac55a --- /dev/null +++ b/src/MatrixSizeInput.svelte @@ -0,0 +1,16 @@ + + +
+ + x + +
+ +