From 9f0ced6e29ae6c41c833f3b4a5e845f3e0bbf950 Mon Sep 17 00:00:00 2001 From: Norbert Maciaszek Date: Mon, 17 Nov 2025 20:08:11 +0100 Subject: [PATCH] feat: add GiftCard and GiftsList components --- src/lib/components/molecules/GiftCard.svelte | 48 ++++++++++++++ src/lib/components/organisms/GiftsList.svelte | 62 +++++++++++++++++++ src/routes/+page.svelte | 4 ++ 3 files changed, 114 insertions(+) create mode 100644 src/lib/components/molecules/GiftCard.svelte create mode 100644 src/lib/components/organisms/GiftsList.svelte diff --git a/src/lib/components/molecules/GiftCard.svelte b/src/lib/components/molecules/GiftCard.svelte new file mode 100644 index 0000000..00fad41 --- /dev/null +++ b/src/lib/components/molecules/GiftCard.svelte @@ -0,0 +1,48 @@ + + +
+
+
+
+ + {gift.title} + +
+ + {#if gift.link} +
+ {#each gift.link.split('\n') as line, index} + e.stopPropagation()}> + Link {index + 1} + + {/each} +
+ {/if} +
+
+ Koszt: {formatCurrency(gift.cost)} +
+ {#if gift.description} +

{gift.description}

+ {/if} +
+
diff --git a/src/lib/components/organisms/GiftsList.svelte b/src/lib/components/organisms/GiftsList.svelte new file mode 100644 index 0000000..1fd37dc --- /dev/null +++ b/src/lib/components/organisms/GiftsList.svelte @@ -0,0 +1,62 @@ + + +
+
+ + +
+ + {#each renderGifts as gift (gift.id)} +
+ +
+ {/each} +
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 1d750dc..5936ff9 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,6 +1,8 @@ @@ -8,3 +10,5 @@

{data.year.year}

+Prezenty tego roku +