aboutsummaryrefslogtreecommitdiff
path: root/src/components/CardThumb.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/CardThumb.svelte')
-rw-r--r--src/components/CardThumb.svelte21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/components/CardThumb.svelte b/src/components/CardThumb.svelte
new file mode 100644
index 0000000..6dcefd2
--- /dev/null
+++ b/src/components/CardThumb.svelte
@@ -0,0 +1,21 @@
+<script lang="ts">
+ let {id} = $props()
+</script>
+
+<div class="card-thumbnail">
+ {#if id}
+ <img height="100%" src="https://cdn.233.momobako.com/ygopro/pics/{id}.jpg!half" alt="yugioh card {id}">
+ {/if}
+</div>
+
+<style>
+
+.card-thumbnail {
+ width: 50px;
+ height: 70px;
+ background-color: #eee;
+ margin-right: 10px;
+ border-radius: 3px;
+}
+
+</style>