mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
✨ Add UI for the “Enable payment methods” checkbox
This commit is contained in:
parent
8b945dab95
commit
365ab7f372
2 changed files with 22 additions and 7 deletions
|
@ -19,12 +19,9 @@
|
|||
position: sticky;
|
||||
top: var(--sticky-offset-top);
|
||||
background: var(--ppcp-color-app-bg);
|
||||
border-bottom: 1px solid var(--color-gray-200);
|
||||
box-shadow: 0 5px 10px 5px var(--ppcp-color-app-bg);
|
||||
z-index: 5;
|
||||
padding-top: 16px;
|
||||
padding-bottom: var(--block-separator-gap);
|
||||
margin-bottom: -29px;
|
||||
padding: 16px 10px 8px;
|
||||
margin: 0 -10px -8px;
|
||||
|
||||
.section-content {
|
||||
display: flex;
|
||||
|
|
|
@ -3,11 +3,23 @@ import { Button } from '@wordpress/components';
|
|||
import { help } from '@wordpress/icons';
|
||||
|
||||
import { StylingHooks } from '../../../../../../data';
|
||||
import { SelectStylingSection, StylingSection } from '../Layout';
|
||||
import {
|
||||
SelectStylingSection,
|
||||
StylingSection,
|
||||
CheckboxStylingSection,
|
||||
} from '../Layout';
|
||||
|
||||
const LocationSelector = ( { location, setLocation } ) => {
|
||||
const { choices, details } = StylingHooks.useLocationProps( location );
|
||||
|
||||
const activateCheckbox = {
|
||||
value: 'active',
|
||||
label: __(
|
||||
'Enable payment methods in this location',
|
||||
'woocommerce-paypal-payments'
|
||||
),
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<StylingSection
|
||||
|
@ -18,7 +30,7 @@ const LocationSelector = ( { location, setLocation } ) => {
|
|||
'Customize the appearance of the PayPal smart buttons on your website and choose which payment buttons to display.',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
></StylingSection>
|
||||
/>
|
||||
<SelectStylingSection
|
||||
className="location-selector"
|
||||
title={ __( 'Location', 'woocommerce-paypal-payments' ) }
|
||||
|
@ -35,6 +47,12 @@ const LocationSelector = ( { location, setLocation } ) => {
|
|||
/>
|
||||
) }
|
||||
</SelectStylingSection>
|
||||
<CheckboxStylingSection
|
||||
className="location-activation"
|
||||
separatorAndGap={ false }
|
||||
options={ [ activateCheckbox ] }
|
||||
value={ 'active' }
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue