woocommerce-paypal-payments/modules/ppcp-settings/resources/js/Components/ReusableComponents/WelcomeDocs/WelcomeDocs.js

50 lines
1.1 KiB
JavaScript
Raw Normal View History

import { __ } from '@wordpress/i18n';
import { countryPriceInfo } from '../../../utils/countryPriceInfo';
2024-11-26 15:01:21 +04:00
import AcdcFlow from './AcdcFlow';
import BcdcFlow from './BcdcFlow';
import { pricesBasedDescription } from './pricesBasedDescription';
2024-11-12 19:23:30 +04:00
2024-11-26 15:01:21 +04:00
const WelcomeDocs = ( {
useAcdc,
isFastlane,
isPayLater,
storeCountry,
storeCurrency,
} ) => {
return (
<div className="ppcp-r-welcome-docs">
<h2 className="ppcp-r-welcome-docs__title">
{ __(
`Want to know more about PayPal Payments?`,
'woocommerce-paypal-payments'
) }
</h2>
{ useAcdc ? (
<AcdcFlow
isFastlane={ isFastlane }
isPayLater={ isPayLater }
storeCountry={ storeCountry }
storeCurrency={ storeCurrency }
/>
) : (
<BcdcFlow
isPayLater={ isPayLater }
storeCountry={ storeCountry }
storeCurrency={ storeCurrency }
/>
) }
{ storeCountry in countryPriceInfo && (
<p
className="ppcp-r-optional-payment-methods__description"
dangerouslySetInnerHTML={ {
__html: pricesBasedDescription,
} }
></p>
) }
2024-11-26 15:01:21 +04:00
</div>
);
2024-11-12 19:23:30 +04:00
};
export default WelcomeDocs;