From 4b0d39c065afc514a4c7beaab13fc0cd95548de9 Mon Sep 17 00:00:00 2001 From: alexlande-stripe Date: Tue, 29 Oct 2024 10:24:17 -0700 Subject: [PATCH] Add missing payment element layout visibleAccordionItemsCount type (#674) * Add missing payment element layout visibleAccordionItemsCount type * Add test --- tests/types/src/valid.ts | 7 +++++++ types/stripe-js/elements/payment.d.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/tests/types/src/valid.ts b/tests/types/src/valid.ts index f6dfe69..76ffa26 100644 --- a/tests/types/src/valid.ts +++ b/tests/types/src/valid.ts @@ -451,6 +451,13 @@ const paymentElement: StripePaymentElement = elements.create('payment', { applePay: 'never', googlePay: 'auto', }, + layout: { + type: 'accordion', + visibleAccordionItemsCount: 2, + defaultCollapsed: true, + radios: true, + spacedAccordionItems: true, + }, }); paymentElement.update({ diff --git a/types/stripe-js/elements/payment.d.ts b/types/stripe-js/elements/payment.d.ts index 3436efb..4db144a 100644 --- a/types/stripe-js/elements/payment.d.ts +++ b/types/stripe-js/elements/payment.d.ts @@ -225,6 +225,7 @@ export interface LayoutObject { defaultCollapsed?: boolean; radios?: boolean; spacedAccordionItems?: boolean; + visibleAccordionItemsCount?: number; } export interface StripePaymentElementOptions {