@stigg/react-sdk 4.4.4 → 4.4.5
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/CheckoutProvider.d.ts +2 -2
- package/dist/components/checkout/components/ChangePlanButton.d.ts +1 -1
- package/dist/components/checkout/components/DowngradeToFreeContainer.d.ts +1 -1
- package/dist/components/checkout/{textOverrides.d.ts → configurations/textOverrides.d.ts} +1 -1
- package/dist/components/checkout/{theme.d.ts → configurations/theme.d.ts} +2 -2
- package/dist/components/checkout/configurations/typography.d.ts +2 -0
- package/dist/components/checkout/index.d.ts +2 -2
- package/dist/components/checkout/promotionCode/AddPromotionCodeButton.d.ts +1 -1
- package/dist/components/checkout/promotionCode/PromotionCodeSection.d.ts +1 -1
- package/dist/components/checkout/steps/payment/PaymentMethods.d.ts +1 -1
- package/dist/components/checkout/steps/plan/BillingPeriodPicker.d.ts +1 -1
- package/dist/components/checkout/summary/CheckoutSuccess.d.ts +1 -1
- package/dist/components/checkout/summary/components/CheckoutCaptions.d.ts +1 -1
- package/dist/components/checkout/summary/components/LineItems.d.ts +1 -1
- package/dist/components/common/mapExternalTheme.d.ts +2 -1
- package/dist/react-sdk.cjs.development.js +50 -29
- 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 +50 -29
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/checkout/CheckoutProvider.tsx +6 -5
- package/src/components/checkout/components/ChangePlanButton.tsx +4 -4
- package/src/components/checkout/components/DowngradeToFreeContainer.tsx +1 -1
- package/src/components/checkout/{textOverrides.ts → configurations/textOverrides.ts} +2 -2
- package/src/components/checkout/{theme.ts → configurations/theme.ts} +2 -2
- package/src/components/checkout/configurations/typography.ts +20 -0
- package/src/components/checkout/index.ts +2 -2
- package/src/components/checkout/planHeader/PlanHeader.tsx +1 -3
- package/src/components/checkout/promotionCode/AddPromotionCodeButton.tsx +3 -2
- package/src/components/checkout/promotionCode/PromotionCodeSection.tsx +1 -1
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +1 -1
- package/src/components/checkout/steps/payment/PaymentMethods.tsx +1 -1
- package/src/components/checkout/steps/plan/BillingPeriodPicker.tsx +2 -2
- package/src/components/checkout/summary/CheckoutSuccess.tsx +1 -1
- package/src/components/checkout/summary/CheckoutSummary.tsx +10 -6
- package/src/components/checkout/summary/components/CheckoutCaptions.tsx +2 -2
- package/src/components/checkout/summary/components/LineItems.tsx +1 -1
- package/src/components/common/mapExternalTheme.ts +14 -10
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import React, { useCallback, useContext, useEffect, useMemo, useState } from 're
|
|
|
3
3
|
import { BillableFeature, BillingPeriod, GetCheckoutStateResults } from '@stigg/js-client-sdk';
|
|
4
4
|
import { CustomizedTheme, SdkThemeProvider, useStiggTheme } from '../../theme/Theme';
|
|
5
5
|
import { DeepPartial } from '../../types';
|
|
6
|
-
import { mapCheckoutConfiguration } from '../common/mapExternalTheme';
|
|
6
|
+
import { mapCheckoutConfiguration, mapTypography } from '../common/mapExternalTheme';
|
|
7
7
|
import {
|
|
8
8
|
AddonsStepState,
|
|
9
9
|
getAddonsStepInitialState,
|
|
@@ -16,10 +16,11 @@ import {
|
|
|
16
16
|
useLoadCheckout,
|
|
17
17
|
WidgetState,
|
|
18
18
|
} from './hooks';
|
|
19
|
-
import { CheckoutLocalization, getResolvedCheckoutLocalize } from './textOverrides';
|
|
20
|
-
import { CheckoutTheme, getResolvedCheckoutTheme } from './theme';
|
|
19
|
+
import { CheckoutLocalization, getResolvedCheckoutLocalize } from './configurations/textOverrides';
|
|
20
|
+
import { CheckoutTheme, getResolvedCheckoutTheme } from './configurations/theme';
|
|
21
21
|
import { StiggTheme } from '../../theme/types';
|
|
22
22
|
import { BillingInformation, MockCheckoutStateCallback } from './types';
|
|
23
|
+
import { defaultCheckoutTypography } from './configurations/typography';
|
|
23
24
|
|
|
24
25
|
export interface CheckoutContextState {
|
|
25
26
|
checkout?: GetCheckoutStateResults | null;
|
|
@@ -98,9 +99,9 @@ export function CheckoutProvider({
|
|
|
98
99
|
children: React.ReactNode;
|
|
99
100
|
} & CheckoutProviderProps) {
|
|
100
101
|
const { checkout, isLoading } = useLoadCheckout({ resourceId, planId, billingCountryCode, onMockCheckoutState });
|
|
101
|
-
const configuration: CustomizedTheme
|
|
102
|
+
const configuration: CustomizedTheme = checkout?.configuration
|
|
102
103
|
? mapCheckoutConfiguration(checkout.configuration)
|
|
103
|
-
:
|
|
104
|
+
: { typography: mapTypography(defaultCheckoutTypography) };
|
|
104
105
|
const globalTheme: StiggTheme = useStiggTheme(configuration);
|
|
105
106
|
|
|
106
107
|
const initialState = useMemo(() => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button } from '@mui/material';
|
|
2
|
-
import { Typography } from '../../common/Typography';
|
|
3
1
|
import React from 'react';
|
|
4
|
-
import { CheckoutLocalization } from '../textOverrides';
|
|
5
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
+
import { Button } from '@mui/material';
|
|
4
|
+
import { Typography } from '../../common/Typography';
|
|
5
|
+
import { CheckoutLocalization } from '../configurations/textOverrides';
|
|
6
6
|
|
|
7
7
|
export const ChangePlanButton = ({
|
|
8
8
|
onClick,
|
|
@@ -23,7 +23,7 @@ export const ChangePlanButton = ({
|
|
|
23
23
|
<Typography
|
|
24
24
|
className="stigg-checkout-change-plan-button-text"
|
|
25
25
|
color="primary.main"
|
|
26
|
-
variant="
|
|
26
|
+
variant="h3"
|
|
27
27
|
style={{ lineHeight: '24px' }}>
|
|
28
28
|
{checkoutLocalization.changePlan}
|
|
29
29
|
</Typography>
|
|
@@ -4,7 +4,7 @@ import { Alert, Box } from '@mui/material';
|
|
|
4
4
|
import { CheckoutStatePlan, Subscription } from '@stigg/js-client-sdk';
|
|
5
5
|
import { StyledArrowRightIcon } from './StyledArrow';
|
|
6
6
|
import { Typography } from '../../common/Typography';
|
|
7
|
-
import { CheckoutLocalization } from '../textOverrides';
|
|
7
|
+
import { CheckoutLocalization } from '../configurations/textOverrides';
|
|
8
8
|
import { CheckoutContainerProps } from '../CheckoutContainer';
|
|
9
9
|
import { ChangePlanButton } from './ChangePlanButton';
|
|
10
10
|
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
} from '@stigg/js-client-sdk';
|
|
9
9
|
import moment from 'moment';
|
|
10
10
|
import merge from 'lodash/merge';
|
|
11
|
-
import { DeepPartial } from '
|
|
12
|
-
import { currencyPriceFormatter } from '
|
|
11
|
+
import { DeepPartial } from '../../../types';
|
|
12
|
+
import { currencyPriceFormatter } from '../../utils/currencyUtils';
|
|
13
13
|
|
|
14
14
|
export type CheckoutLocalization = {
|
|
15
15
|
changePlan: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CheckoutConfiguration } from '@stigg/js-client-sdk';
|
|
2
|
-
import { StiggTheme } from '
|
|
3
|
-
import { DeepPartial } from '
|
|
2
|
+
import { StiggTheme } from '../../../theme/types';
|
|
3
|
+
import { DeepPartial } from '../../../types';
|
|
4
4
|
|
|
5
5
|
export type CheckoutTheme = {
|
|
6
6
|
primary: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FontWeight, TypographyConfiguration } from '@stigg/js-client-sdk';
|
|
2
|
+
|
|
3
|
+
export const defaultCheckoutTypography: TypographyConfiguration = {
|
|
4
|
+
h1: {
|
|
5
|
+
fontSize: 24,
|
|
6
|
+
fontWeight: FontWeight.Bold,
|
|
7
|
+
},
|
|
8
|
+
h2: {
|
|
9
|
+
fontSize: 16,
|
|
10
|
+
fontWeight: FontWeight.Normal,
|
|
11
|
+
},
|
|
12
|
+
h3: {
|
|
13
|
+
fontSize: 16,
|
|
14
|
+
fontWeight: FontWeight.Normal,
|
|
15
|
+
},
|
|
16
|
+
body: {
|
|
17
|
+
fontSize: 14,
|
|
18
|
+
fontWeight: FontWeight.Normal,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CheckoutTheme } from './theme';
|
|
1
|
+
export { CheckoutTheme } from './configurations/theme';
|
|
2
2
|
export {
|
|
3
3
|
OnCheckoutCompletedParams,
|
|
4
4
|
OnCheckoutParams,
|
|
@@ -6,6 +6,6 @@ export {
|
|
|
6
6
|
CheckoutContainerProps,
|
|
7
7
|
} from './CheckoutContainer';
|
|
8
8
|
export { CheckoutProviderProps } from './CheckoutProvider';
|
|
9
|
-
export { CheckoutLocalization } from './textOverrides';
|
|
9
|
+
export { CheckoutLocalization } from './configurations/textOverrides';
|
|
10
10
|
export { Checkout, CheckoutProps } from './Checkout';
|
|
11
11
|
export * from './types';
|
|
@@ -23,9 +23,7 @@ export function PlanHeader({ allowChangePlan = false, onChangePlan }: PlanHeader
|
|
|
23
23
|
</Typography>
|
|
24
24
|
|
|
25
25
|
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
26
|
-
<Typography variant="
|
|
27
|
-
{plan?.displayName}
|
|
28
|
-
</Typography>
|
|
26
|
+
<Typography variant="h1">{plan?.displayName}</Typography>
|
|
29
27
|
|
|
30
28
|
{allowChangePlan && onChangePlan && (
|
|
31
29
|
<ChangePlanButton
|
|
@@ -4,9 +4,10 @@ import styled from '@emotion/styled/macro';
|
|
|
4
4
|
import PlusIcon from '../../../assets/plus-icon.svg';
|
|
5
5
|
import { Typography } from '../../common/Typography';
|
|
6
6
|
import { Button } from '../components';
|
|
7
|
-
import { CheckoutLocalization } from '../textOverrides';
|
|
7
|
+
import { CheckoutLocalization } from '../configurations/textOverrides';
|
|
8
8
|
|
|
9
9
|
const StyledPlusIcon = styled(PlusIcon, { shouldForwardProp: (prop) => !prop.startsWith('$') })<{ $disabled: boolean }>`
|
|
10
|
+
margin-right: 8px;
|
|
10
11
|
path {
|
|
11
12
|
stroke: ${({ theme, $disabled }) => ($disabled ? theme.stigg.palette.text.disabled : theme.stigg.palette.primary)};
|
|
12
13
|
}
|
|
@@ -36,7 +37,7 @@ export const AddPromotionCodeButton = ({ onAddClick, checkoutLocalization, disab
|
|
|
36
37
|
className="stigg-checkout-change-plan-button-text"
|
|
37
38
|
color={disabled ? 'disabled' : 'primary.main'}
|
|
38
39
|
style={{ lineHeight: '24px' }}
|
|
39
|
-
variant="
|
|
40
|
+
variant="h3">
|
|
40
41
|
{checkoutLocalization.summary.addCouponCodeText}
|
|
41
42
|
</Typography>
|
|
42
43
|
</Button>
|
|
@@ -3,7 +3,7 @@ import styled from '@emotion/styled/macro';
|
|
|
3
3
|
import { usePromotionCodeModel } from '../hooks/useCouponModel';
|
|
4
4
|
import { AddPromotionCode } from './AddPromotionCode';
|
|
5
5
|
import { AppliedPromotionCode } from './AppliedPromotionCode';
|
|
6
|
-
import { CheckoutLocalization } from '../textOverrides';
|
|
6
|
+
import { CheckoutLocalization } from '../configurations/textOverrides';
|
|
7
7
|
import { MockCheckoutPreviewCallback } from '../types';
|
|
8
8
|
|
|
9
9
|
const PromotionCodeSectionContainer = styled.div`
|
|
@@ -10,7 +10,7 @@ import { Button, InputField } from '../../components';
|
|
|
10
10
|
import { useAddonsStepModel } from '../../hooks/useAddonsStepModel';
|
|
11
11
|
import { usePlanStepModel } from '../../hooks/usePlanStepModel';
|
|
12
12
|
import { AddonListItemContainer, CheckoutAddonsContainer, TrashButton } from './CheckoutAddonsStep.style';
|
|
13
|
-
import { CheckoutLocalization } from '../../textOverrides';
|
|
13
|
+
import { CheckoutLocalization } from '../../configurations/textOverrides';
|
|
14
14
|
import { useCheckoutModel, useProgressBarModel } from '../../hooks';
|
|
15
15
|
|
|
16
16
|
type UseAddonsStepModel = ReturnType<typeof useAddonsStepModel>;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
PaymentMethodTextContainer,
|
|
13
13
|
} from './PaymentMethods.style';
|
|
14
14
|
import { StripePaymentForm } from './stripe';
|
|
15
|
-
import { CheckoutLocalization } from '../../textOverrides';
|
|
15
|
+
import { CheckoutLocalization } from '../../configurations/textOverrides';
|
|
16
16
|
import { CheckoutContainerProps } from '../../CheckoutContainer';
|
|
17
17
|
|
|
18
18
|
export type PaymentMethodLayoutProps = {
|
|
@@ -9,7 +9,7 @@ import { Typography } from '../../../common/Typography';
|
|
|
9
9
|
import { formatBillingPeriod } from '../../formatting';
|
|
10
10
|
import { usePlanStepModel } from '../../hooks/usePlanStepModel';
|
|
11
11
|
import { BillingPeriodButton, BillingPeriodOptions, BillingPeriodPickerContainer } from './BillingPeriodPicker.style';
|
|
12
|
-
import { CheckoutLocalization } from '../../textOverrides';
|
|
12
|
+
import { CheckoutLocalization } from '../../configurations/textOverrides';
|
|
13
13
|
|
|
14
14
|
const BillingPeriodOption = ({
|
|
15
15
|
billingPeriod,
|
|
@@ -36,7 +36,7 @@ const BillingPeriodOption = ({
|
|
|
36
36
|
/>
|
|
37
37
|
|
|
38
38
|
<Box>
|
|
39
|
-
<Typography variant="
|
|
39
|
+
<Typography variant="h3" color="primary">
|
|
40
40
|
{formatBillingPeriod(billingPeriod)}
|
|
41
41
|
</Typography>
|
|
42
42
|
</Box>
|
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import Lottie from 'react-lottie';
|
|
6
6
|
import animationData from '../../../assets/lottie/checkout-success.json';
|
|
7
7
|
import { Typography } from '../../common/Typography';
|
|
8
|
-
import { CheckoutLocalization } from '../textOverrides';
|
|
8
|
+
import { CheckoutLocalization } from '../configurations/textOverrides';
|
|
9
9
|
|
|
10
10
|
export const ANIMATION_DURATION = 5000;
|
|
11
11
|
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from './components/LineItems';
|
|
31
31
|
import { WithSkeleton } from './components/WithSkeleton';
|
|
32
32
|
import { Icon } from '../../common/Icon';
|
|
33
|
-
import { CheckoutLocalization } from '../textOverrides';
|
|
33
|
+
import { CheckoutLocalization } from '../configurations/textOverrides';
|
|
34
34
|
import { CheckoutSuccess } from './CheckoutSuccess';
|
|
35
35
|
import { getFeatureDisplayNameText } from '../../utils/getFeatureName';
|
|
36
36
|
|
|
@@ -176,10 +176,10 @@ export const CheckoutSummary = ({
|
|
|
176
176
|
return (
|
|
177
177
|
<SummaryContainer>
|
|
178
178
|
<SummaryCard>
|
|
179
|
-
<SummaryTitle variant="
|
|
179
|
+
<SummaryTitle variant="h3">{checkoutLocalization.summary.title}</SummaryTitle>
|
|
180
180
|
|
|
181
181
|
<Grid display="flex" flexDirection="row" alignItems="center" marginY={2}>
|
|
182
|
-
<Typography variant="
|
|
182
|
+
<Typography variant="h6" color="primary" style={{ paddingRight: '8px' }}>
|
|
183
183
|
{checkoutLocalization.summary.planName({ plan: plan! })}
|
|
184
184
|
</Typography>
|
|
185
185
|
<StyledDivider className="stigg-checkout-summary-divider" sx={{ flex: 1, margin: '0 !important' }} />
|
|
@@ -218,7 +218,7 @@ export const CheckoutSummary = ({
|
|
|
218
218
|
{!!subscription.addons?.length && (
|
|
219
219
|
<>
|
|
220
220
|
<Grid display="flex" flexDirection="row" alignItems="center" marginY={2}>
|
|
221
|
-
<Typography variant="
|
|
221
|
+
<Typography variant="h6" color="primary" style={{ paddingRight: '8px' }}>
|
|
222
222
|
{checkoutLocalization.summary.addonsSectionTitle}
|
|
223
223
|
</Typography>
|
|
224
224
|
<StyledDivider className="stigg-checkout-summary-divider" sx={{ flex: 1, margin: '0 !important' }} />
|
|
@@ -248,7 +248,7 @@ export const CheckoutSummary = ({
|
|
|
248
248
|
{!hasDiscounts && <StyledDivider className="stigg-checkout-summary-divider" />}
|
|
249
249
|
{hasDiscounts && (
|
|
250
250
|
<Grid display="flex" flexDirection="row" alignItems="center" marginY={2}>
|
|
251
|
-
<Typography variant="
|
|
251
|
+
<Typography variant="h6" color="primary" style={{ paddingRight: '8px' }}>
|
|
252
252
|
{checkoutLocalization.summary.discountsSectionTitle}
|
|
253
253
|
</Typography>
|
|
254
254
|
<StyledDivider className="stigg-checkout-summary-divider" sx={{ flex: 1, margin: '0 !important' }} />
|
|
@@ -375,7 +375,11 @@ export const CheckoutSummary = ({
|
|
|
375
375
|
void onCheckoutClick(e);
|
|
376
376
|
}}
|
|
377
377
|
fullWidth>
|
|
378
|
-
<Typography
|
|
378
|
+
<Typography
|
|
379
|
+
className="stigg-checkout-summary-cta-button-text"
|
|
380
|
+
variant="h3"
|
|
381
|
+
color="white"
|
|
382
|
+
style={{ display: 'flex' }}>
|
|
379
383
|
{isCheckoutCompletedSuccessfully ? (
|
|
380
384
|
<Icon icon="Check" style={{ display: 'contents' }} />
|
|
381
385
|
) : isLoading || isFetchingSubscriptionPreview ? (
|
|
@@ -4,7 +4,7 @@ import moment from 'moment';
|
|
|
4
4
|
import { BillingModel, BillingPeriod, Plan, Subscription, SubscriptionPreviewV2 } from '@stigg/js-client-sdk';
|
|
5
5
|
import { Typography } from '../../../common/Typography';
|
|
6
6
|
import { currencyPriceFormatter } from '../../../utils/currencyUtils';
|
|
7
|
-
import { CheckoutLocalization } from '../../textOverrides';
|
|
7
|
+
import { CheckoutLocalization } from '../../configurations/textOverrides';
|
|
8
8
|
import { WithSkeleton } from './WithSkeleton';
|
|
9
9
|
|
|
10
10
|
export type CheckoutCaptionProps = {
|
|
@@ -123,7 +123,7 @@ const NextBillingCaption = ({
|
|
|
123
123
|
text += `${totalAmountText}for this subscription every ${billingPeriodText} on ${nextBillingDate}, unless you cancel.`;
|
|
124
124
|
|
|
125
125
|
return (
|
|
126
|
-
<Typography variant="
|
|
126
|
+
<Typography variant="body1" style={{ marginTop: 14 }}>
|
|
127
127
|
<WithSkeleton isLoading={isFetchingSubscriptionPreview} width="100%">
|
|
128
128
|
{text}
|
|
129
129
|
</WithSkeleton>
|
|
@@ -7,7 +7,7 @@ import { currencyPriceFormatter } from '../../../utils/currencyUtils';
|
|
|
7
7
|
import { getTierByQuantity } from '../../../utils/priceTierUtils';
|
|
8
8
|
import { WithSkeleton } from './WithSkeleton';
|
|
9
9
|
import { Skeleton } from '../../components/Skeletons.style';
|
|
10
|
-
import { CheckoutLocalization } from '../../textOverrides';
|
|
10
|
+
import { CheckoutLocalization } from '../../configurations/textOverrides';
|
|
11
11
|
import { Icon } from '../../../common/Icon';
|
|
12
12
|
import { InformationTooltip } from '../../../common/InformationTooltip';
|
|
13
13
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from '@stigg/js-client-sdk';
|
|
9
9
|
import { CustomizedTheme } from '../../theme/Theme';
|
|
10
10
|
import { HorizontalAlignment, FontWeight } from '../../theme/types';
|
|
11
|
+
import { defaultCheckoutTypography } from '../checkout/configurations/typography';
|
|
11
12
|
|
|
12
13
|
function addCssUnits(value?: number | null, unit = 'px') {
|
|
13
14
|
if (!value) {
|
|
@@ -31,24 +32,27 @@ function mapFontWeight(defaultValue: FontWeight, fontWeight?: JSFontWeight | nul
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
function mapTypography(
|
|
35
|
+
export function mapTypography(
|
|
36
|
+
typography?: TypographyConfiguration | null,
|
|
37
|
+
defaultTypography?: TypographyConfiguration | null,
|
|
38
|
+
): CustomizedTheme['typography'] {
|
|
35
39
|
return {
|
|
36
40
|
fontFamilyUrl: typography?.fontFamily || undefined,
|
|
37
41
|
h1: {
|
|
38
|
-
fontSize: addCssUnits(typography?.h1?.fontSize),
|
|
39
|
-
fontWeight: mapFontWeight('bold', typography?.h1?.fontWeight),
|
|
42
|
+
fontSize: addCssUnits(typography?.h1?.fontSize || defaultTypography?.h1?.fontSize),
|
|
43
|
+
fontWeight: mapFontWeight('bold', typography?.h1?.fontWeight || defaultTypography?.h1?.fontWeight),
|
|
40
44
|
},
|
|
41
45
|
h2: {
|
|
42
|
-
fontSize: addCssUnits(typography?.h2?.fontSize),
|
|
43
|
-
fontWeight: mapFontWeight('normal',
|
|
46
|
+
fontSize: addCssUnits(typography?.h2?.fontSize || defaultTypography?.h2?.fontSize),
|
|
47
|
+
fontWeight: mapFontWeight('normal', defaultTypography?.h2?.fontWeight),
|
|
44
48
|
},
|
|
45
49
|
h3: {
|
|
46
|
-
fontSize: addCssUnits(typography?.h3?.fontSize),
|
|
47
|
-
fontWeight: mapFontWeight('normal', typography?.h3?.fontWeight),
|
|
50
|
+
fontSize: addCssUnits(typography?.h3?.fontSize || defaultTypography?.h3?.fontSize),
|
|
51
|
+
fontWeight: mapFontWeight('normal', typography?.h3?.fontWeight || defaultTypography?.h3?.fontWeight),
|
|
48
52
|
},
|
|
49
53
|
body: {
|
|
50
|
-
fontSize: addCssUnits(typography?.body?.fontSize),
|
|
51
|
-
fontWeight: mapFontWeight('normal', typography?.body?.fontWeight),
|
|
54
|
+
fontSize: addCssUnits(typography?.body?.fontSize || defaultTypography?.body?.fontSize),
|
|
55
|
+
fontWeight: mapFontWeight('normal', typography?.body?.fontWeight || defaultTypography?.body?.fontWeight),
|
|
52
56
|
},
|
|
53
57
|
};
|
|
54
58
|
}
|
|
@@ -125,6 +129,6 @@ export function mapCheckoutConfiguration(configuration: CheckoutConfiguration):
|
|
|
125
129
|
},
|
|
126
130
|
backgroundHighlight: palette?.summaryBackgroundColor || undefined,
|
|
127
131
|
},
|
|
128
|
-
typography: mapTypography(typography),
|
|
132
|
+
typography: mapTypography(typography, defaultCheckoutTypography),
|
|
129
133
|
};
|
|
130
134
|
}
|