From a0eb060257e1893b1606657672e8853e7ec5f5dc Mon Sep 17 00:00:00 2001 From: Norbert Maciaszek Date: Fri, 21 Nov 2025 01:17:57 +0100 Subject: [PATCH] feat: update Button and StatsCard styles for improved UI and enhance GiftsList sorting logic --- src/lib/components/atoms/Button.svelte | 8 ++- src/lib/components/atoms/StatsCard.svelte | 8 +-- src/lib/components/molecules/GiftCard.svelte | 3 -- src/lib/components/organisms/GiftsList.svelte | 52 +++++++++++++------ 4 files changed, 45 insertions(+), 26 deletions(-) diff --git a/src/lib/components/atoms/Button.svelte b/src/lib/components/atoms/Button.svelte index f3f9a60..6cff03e 100644 --- a/src/lib/components/atoms/Button.svelte +++ b/src/lib/components/atoms/Button.svelte @@ -1,11 +1,12 @@ {#if href} - + {@render children()} {:else} diff --git a/src/lib/components/atoms/StatsCard.svelte b/src/lib/components/atoms/StatsCard.svelte index 1380ef4..d7e76bd 100644 --- a/src/lib/components/atoms/StatsCard.svelte +++ b/src/lib/components/atoms/StatsCard.svelte @@ -9,11 +9,11 @@
-
{title}
-
{value}
+
{title}
+
{value}
{#if description} -
{description}
+
{description}
{/if}
diff --git a/src/lib/components/molecules/GiftCard.svelte b/src/lib/components/molecules/GiftCard.svelte index a7631f4..884cd83 100644 --- a/src/lib/components/molecules/GiftCard.svelte +++ b/src/lib/components/molecules/GiftCard.svelte @@ -4,7 +4,6 @@ import { DB } from '$lib/integrations/db'; import Badge from '../atoms/Badge.svelte'; import Heading from '../atoms/Heading.svelte'; - import { fly } from 'svelte/transition'; import GiftModal from './GiftModal.svelte'; type Props = { @@ -26,8 +25,6 @@
(isEditModal = true)} >
diff --git a/src/lib/components/organisms/GiftsList.svelte b/src/lib/components/organisms/GiftsList.svelte index 1fd37dc..4ca3f90 100644 --- a/src/lib/components/organisms/GiftsList.svelte +++ b/src/lib/components/organisms/GiftsList.svelte @@ -1,7 +1,7 @@
- {#each renderGifts as gift (gift.id)} -
- + {#key filter} +
+ {#each renderedGifts as gift (gift.id)} +
+ +
+ {/each}
- {/each} + {/key}