From 163f919b4d561c3f4bff2f514e0db2f1a43de09f Mon Sep 17 00:00:00 2001 From: yikliu-stripe Date: Fri, 29 May 2026 10:32:18 -0700 Subject: [PATCH] Expose onCancel prop on Checkout ExpressCheckoutElement (#680) * Expose onCancel prop on Checkout ExpressCheckoutElement Remove onCancel from the Omit in ExpressCheckoutElementProps so consumers can listen to the cancel event, which was already wired up at runtime. Co-Authored-By: Claude Sonnet 4.6 Committed-By-Agent: claude * Formatting the code --------- Co-authored-by: Claude Sonnet 4.6 --- src/checkout/types/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/checkout/types/index.ts b/src/checkout/types/index.ts index 23db7192..5ec4dd1b 100644 --- a/src/checkout/types/index.ts +++ b/src/checkout/types/index.ts @@ -73,11 +73,7 @@ export type CheckoutFormComponent = FunctionComponent; export type ExpressCheckoutElementProps = Omit< RootExpressCheckoutElementProps, - | 'options' - | 'onClick' - | 'onCancel' - | 'onShippingAddressChange' - | 'onShippingRateChange' + 'options' | 'onClick' | 'onShippingAddressChange' | 'onShippingRateChange' > & {options?: stripeJs.StripeCheckoutExpressCheckoutElementOptions}; export type ExpressCheckoutElementComponent = FunctionComponent<