From 5ac8f1768f2b29af0498b0ffb39eb15117c90a0e Mon Sep 17 00:00:00 2001 From: Marcel Raddatz Date: Sat, 4 Apr 2026 18:54:47 +0200 Subject: [PATCH] feat(shopping): add AddCustomItem.svelte component Expandable inline form for adding custom items to the shopping list. Includes name, quantity, and unit fields with cancel/submit actions. Co-Authored-By: Claude Opus 4.6 --- .../src/lib/shopping/AddCustomItem.svelte | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 frontend/src/lib/shopping/AddCustomItem.svelte diff --git a/frontend/src/lib/shopping/AddCustomItem.svelte b/frontend/src/lib/shopping/AddCustomItem.svelte new file mode 100644 index 0000000..90b9735 --- /dev/null +++ b/frontend/src/lib/shopping/AddCustomItem.svelte @@ -0,0 +1,86 @@ + + +{#if !expanded} + +{:else} +
{ + return async ({ update }) => { + await update(); + customName = ''; + quantity = '1'; + unit = ''; + expanded = false; + }; + }} + class="flex flex-col gap-2 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-3" + > + + + + +
+ + +
+ +
+ + +
+
+{/if}