@stigg/react-sdk 4.4.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/checkout/progressBar/CheckoutProgressBar.style.d.ts +0 -1
- package/dist/react-sdk.cjs.development.js +16 -14
- package/dist/react-sdk.cjs.development.js.map +1 -1
- package/dist/react-sdk.cjs.production.min.js +1 -1
- package/dist/react-sdk.cjs.production.min.js.map +1 -1
- package/dist/react-sdk.esm.js +16 -14
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/checkout/CheckoutContainer.tsx +5 -4
- package/src/components/checkout/components/InputField.tsx +3 -0
- package/src/components/checkout/progressBar/CheckoutProgressBar.style.ts +2 -3
- package/src/components/checkout/progressBar/CheckoutProgressBar.tsx +0 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { Elements } from '@stripe/react-stripe-js';
|
|
3
3
|
import { PricingType, BillingAddress, ApplySubscription, CheckoutStatePlan } from '@stigg/js-client-sdk';
|
|
4
4
|
import { CheckoutContent, CheckoutLayout, CheckoutPanel } from './CheckoutContainer.style';
|
|
@@ -94,9 +94,10 @@ export function CheckoutContainer({
|
|
|
94
94
|
</>
|
|
95
95
|
);
|
|
96
96
|
|
|
97
|
-
const stripeElementsMode: StripeClientSecret | StripeManualMode =
|
|
98
|
-
? { clientSecret: setupIntentClientSecret }
|
|
99
|
-
|
|
97
|
+
const stripeElementsMode: StripeClientSecret | StripeManualMode = useMemo(
|
|
98
|
+
() => (setupIntentClientSecret ? { clientSecret: setupIntentClientSecret } : { mode: 'setup', currency: 'usd' }),
|
|
99
|
+
[setupIntentClientSecret],
|
|
100
|
+
);
|
|
100
101
|
|
|
101
102
|
return (
|
|
102
103
|
<Elements
|
|
@@ -25,11 +25,10 @@ export const StyledStepButton = styled(Button)(() => ({
|
|
|
25
25
|
|
|
26
26
|
export const StyledIcon = styled(Icon, { shouldForwardProp: (prop) => !prop.startsWith('$') })<{
|
|
27
27
|
$disabled?: boolean;
|
|
28
|
-
$shouldStroke?: boolean;
|
|
29
28
|
$shouldFill?: boolean;
|
|
30
|
-
}>(({ theme, $disabled, $
|
|
29
|
+
}>(({ theme, $disabled, $shouldFill }) => ({
|
|
31
30
|
circle: {
|
|
32
|
-
stroke: $
|
|
31
|
+
stroke: $disabled ? theme.stigg.palette.primaryLight : theme.stigg.palette.primary,
|
|
33
32
|
fill: $shouldFill ? ($disabled ? theme.stigg.palette.primaryLight : theme.stigg.palette.primary) : undefined,
|
|
34
33
|
},
|
|
35
34
|
}));
|