0 ? (selectedVariant ?? "") : ""} />}
+
+ {limitReached ? "Maximale Menge im Warenkorb" : added ? "Hinzugefügt ✓" : label}
+
+
+
+ )}
);
}
diff --git a/app/components/NotifyMeForm.tsx b/app/components/NotifyMeForm.tsx
index 16b8f21..720af59 100644
--- a/app/components/NotifyMeForm.tsx
+++ b/app/components/NotifyMeForm.tsx
@@ -13,6 +13,15 @@ import { isValidEmail } from "../lib/email";
* same "numericId, not id" split WishlistButton already uses.
*/
export function NotifyMeForm({ productId, variantName = "" }: { productId: number; variantName?: string }) {
+ // Collapsed by default (a single button, same height/style as
+ // AddToCartInlineButton's own "In den Warenkorb" button) — grid card
+ // layouts here rely on every card in a row being stretched to equal
+ // height (plain CSS Grid, no explicit height), so an always-expanded
+ // input+button would make an out-of-stock card taller than its row
+ // siblings and push THEIR buttons down as the row stretches to match.
+ // Expanding only after a click keeps the idle-state card height
+ // identical to every in-stock card next to it.
+ const [expanded, setExpanded] = useState(false);
const [email, setEmail] = useState("");
const [status, setStatus] = useState<"idle" | "submitting" | "success" | "error">("idle");
const [error, setError] = useState("");
@@ -48,12 +57,25 @@ export function NotifyMeForm({ productId, variantName = "" }: { productId: numbe
return Danke! Wir melden uns, sobald es wieder verfügbar ist.
;
}
+ if (!expanded) {
+ return (
+
+ );
+ }
+
return (
// Stacked, not side-by-side — narrow product cards (shop grid, related
// products) don't leave enough width for input + button in one row
// without either truncating the placeholder or squeezing the button.