woocommerce-paypal-payments/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepWelcome.js

99 lines
3 KiB
JavaScript
Raw Normal View History

2024-11-21 19:28:08 +01:00
import { __ } from '@wordpress/i18n';
import { Button } from '@wordpress/components';
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
2024-10-23 15:24:52 +02:00
import PaymentMethodIcons from '../../ReusableComponents/PaymentMethodIcons';
import Separator from '../../ReusableComponents/Separator';
2024-11-12 19:23:30 +04:00
import WelcomeDocs from '../../ReusableComponents/WelcomeDocs/WelcomeDocs';
2024-11-21 19:28:08 +01:00
import AccordionSection from '../../ReusableComponents/AccordionSection';
import AdvancedOptionsForm from './Components/AdvancedOptionsForm';
2024-10-23 08:56:47 +02:00
2024-10-31 09:47:06 +02:00
const StepWelcome = ( { setStep, currentStep, setCompleted } ) => {
2024-10-23 08:56:47 +02:00
return (
<div className="ppcp-r-page-welcome">
<OnboardingHeader
title={ __(
'Welcome to PayPal Payments',
'woocommerce-paypal-payments'
) }
description={ __(
2024-11-12 15:01:29 +01:00
'Your all-in-one integration for PayPal checkout solutions that enable buyers to pay via PayPal, Pay Later, all major credit/debit cards, Apple Pay, Google Pay, and more.',
2024-10-23 08:56:47 +02:00
'woocommerce-paypal-payments'
) }
/>
<div className="ppcp-r-inner-container">
<WelcomeFeatures />
<PaymentMethodIcons icons="all" />
<p className="ppcp-r-button__description">
{ __(
`Click the button below to be guided through connecting your existing PayPal account or creating a new one.You will be able to choose the payment options that are right for your store.`,
'woocommerce-paypal-payments'
) }
</p>
2024-10-23 08:56:47 +02:00
<Button
className="ppcp-r-button-activate-paypal"
variant="primary"
2024-10-24 06:35:48 +02:00
onClick={ () => setStep( currentStep + 1 ) }
2024-10-23 08:56:47 +02:00
>
{ __(
'Activate PayPal Payments',
'woocommerce-paypal-payments'
) }
</Button>
</div>
<Separator className="ppcp-r-page-welcome-mode-separator" />
2024-11-12 19:23:30 +04:00
<WelcomeDocs
2024-11-14 11:52:00 +01:00
useAcdc={ true }
isFastlane={ true }
isPayLater={ true }
storeCountry={ 'us' }
storeCurrency={ 'usd' }
/>
<Separator text={ __( 'or', 'woocommerce-paypal-payments' ) } />
<AccordionSection
title={ __(
'See advanced options',
'woocommerce-paypal-payments'
) }
className="onboarding-advanced-options"
id="advanced-options"
>
<AdvancedOptionsForm setCompleted={ setCompleted } />
</AccordionSection>
2024-10-23 08:56:47 +02:00
</div>
);
};
const WelcomeFeatures = () => {
return (
<div className="ppcp-r-welcome-features">
<div className="ppcp-r-welcome-features__col">
<span>{ __( 'Deposits', 'woocommerce-paypal-payments' ) }</span>
<p>{ __( 'Instant', 'woocommerce-paypal-payments' ) }</p>
</div>
<div className="ppcp-r-welcome-features__col">
<span>
{ __( 'Payment Capture', 'woocommerce-paypal-payments' ) }
</span>
<p>
{ __(
'Authorize only or Capture',
'woocommerce-paypal-payments'
) }
</p>
</div>
<div className="ppcp-r-welcome-features__col">
<span>
{ __(
'Recurring payments',
'woocommerce-paypal-payments'
) }
</span>
<p>{ __( 'Supported', 'woocommerce-paypal-payments' ) }</p>
</div>
</div>
);
};
export default StepWelcome;