Skip to content

Commit f9fa371

Browse files
Export CheckoutContextValue type for useCheckout hook (#588)
* Export CheckoutContextValue type * run prettier
1 parent 6029e7f commit f9fa371

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/CheckoutProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type StripeCheckoutActions = Omit<
4242
'on'
4343
>;
4444

45-
interface CheckoutContextValue
45+
export interface CheckoutContextValue
4646
extends StripeCheckoutActions,
4747
stripeJs.StripeCheckoutSession {}
4848
const CheckoutContext = React.createContext<CheckoutContextValue | null>(null);

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ export * from './types';
2727

2828
export {useElements, Elements, ElementsConsumer} from './components/Elements';
2929

30-
export {useCheckout, CheckoutProvider} from './components/CheckoutProvider';
30+
export {
31+
useCheckout,
32+
CheckoutProvider,
33+
CheckoutContextValue,
34+
} from './components/CheckoutProvider';
3135
export {EmbeddedCheckout} from './components/EmbeddedCheckout';
3236
export {EmbeddedCheckoutProvider} from './components/EmbeddedCheckoutProvider';
3337
export {useStripe} from './components/useStripe';

0 commit comments

Comments
 (0)