Skip to content

Commit

Permalink
Add missing payment element layout visibleAccordionItemsCount type (#674
Browse files Browse the repository at this point in the history
)

* Add missing payment element layout visibleAccordionItemsCount type

* Add test
  • Loading branch information
alexlande-stripe authored Oct 29, 2024
1 parent 582cbfa commit 4b0d39c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/types/src/valid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
1 change: 1 addition & 0 deletions types/stripe-js/elements/payment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export interface LayoutObject {
defaultCollapsed?: boolean;
radios?: boolean;
spacedAccordionItems?: boolean;
visibleAccordionItemsCount?: number;
}

export interface StripePaymentElementOptions {
Expand Down

0 comments on commit 4b0d39c

Please sign in to comment.