mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Allow options to be passed to StripeProvider.
This commit is contained in:
parent
86fa899b1f
commit
efa93ba024
5
types/react-stripe-elements/index.d.ts
vendored
5
types/react-stripe-elements/index.d.ts
vendored
@ -27,7 +27,10 @@ export namespace ReactStripeElements {
|
||||
error?: { decline_code?: string };
|
||||
};
|
||||
|
||||
type StripeProviderProps = { apiKey: string; stripe?: never; } | { apiKey?: never; stripe: StripeProps | null; };
|
||||
interface StripeProviderOptions {
|
||||
stripeAccount?: string;
|
||||
}
|
||||
type StripeProviderProps = { apiKey: string; stripe?: never; options?: StripeProviderOptions } | { apiKey?: never; stripe: StripeProps | null; options?: StripeProviderOptions; };
|
||||
|
||||
interface StripeProps {
|
||||
createSource(sourceData?: SourceOptions): Promise<SourceResponse>;
|
||||
|
||||
@ -195,3 +195,8 @@ const TestStripeProviderProps2: React.SFC<{
|
||||
const TestStripeProviderProps3: React.SFC<{
|
||||
stripe: StripeProps;
|
||||
}> = props => <StripeProvider stripe={null} />;
|
||||
|
||||
/**
|
||||
* StripeProvider should be able to accept an `options` prop
|
||||
*/
|
||||
const TestStripeProviderOptions: React.SFC = () => <StripeProvider apiKey="" options={{stripeAccount: ""}} />;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user