@@ -4,6 +4,7 @@ import { useState } from 'react';
44
55import { PROFILE_CARD_SCROLLBOX_ID } from '../../constants' ;
66import { __experimental_CheckoutContext , usePricingTableContext } from '../../contexts' ;
7+ import { AppearanceProvider } from '../../customizables' ;
78import { useFetch } from '../../hooks' ;
89import { __experimental_Checkout } from '../Checkout' ;
910import { PlanDetailDrawer } from './PlanDetailDrawer' ;
@@ -54,33 +55,38 @@ export const __experimental_PricingTable = (props: __experimental_PricingTablePr
5455 />
5556 ) }
5657
57- < __experimental_CheckoutContext . Provider
58- value = { {
59- componentName : 'Checkout' ,
60- mode,
61- isOpen : showCheckout ,
62- setIsOpen : setShowCheckout ,
63- } }
58+ < AppearanceProvider
59+ appearanceKey = 'checkout'
60+ appearance = { props . checkoutProps ?. appearance }
6461 >
65- { /*TODO: Used by InvisibleRootBox, can we simplify? */ }
66- < div >
67- < __experimental_Checkout
68- planPeriod = { planPeriod }
69- planId = { selectedPlan ?. id }
70- />
71- </ div >
72- </ __experimental_CheckoutContext . Provider >
73- < PlanDetailDrawer
74- isOpen = { showPlanDetail }
75- setIsOpen = { setShowPlanDetail }
76- plan = { selectedPlan }
77- planPeriod = { planPeriod }
78- setPlanPeriod = { setPlanPeriod }
79- strategy = { mode === 'mounted' ? 'fixed' : 'absolute' }
80- portalProps = { {
81- id : mode === 'modal' ? PROFILE_CARD_SCROLLBOX_ID : undefined ,
82- } }
83- />
62+ < __experimental_CheckoutContext . Provider
63+ value = { {
64+ componentName : 'Checkout' ,
65+ mode,
66+ isOpen : showCheckout ,
67+ setIsOpen : setShowCheckout ,
68+ } }
69+ >
70+ { /*TODO: Used by InvisibleRootBox, can we simplify? */ }
71+ < div >
72+ < __experimental_Checkout
73+ planPeriod = { planPeriod }
74+ planId = { selectedPlan ?. id }
75+ />
76+ </ div >
77+ </ __experimental_CheckoutContext . Provider >
78+ < PlanDetailDrawer
79+ isOpen = { showPlanDetail }
80+ setIsOpen = { setShowPlanDetail }
81+ plan = { selectedPlan }
82+ planPeriod = { planPeriod }
83+ setPlanPeriod = { setPlanPeriod }
84+ strategy = { mode === 'mounted' ? 'fixed' : 'absolute' }
85+ portalProps = { {
86+ id : mode === 'modal' ? PROFILE_CARD_SCROLLBOX_ID : undefined ,
87+ } }
88+ />
89+ </ AppearanceProvider >
8490 </ >
8591 ) ;
8692} ;
0 commit comments