mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
💄 Improvement UX for the “tagline” option
This commit is contained in:
parent
0428dd08aa
commit
00c00bf9b1
5 changed files with 21 additions and 11 deletions
|
@ -36,6 +36,11 @@
|
|||
&.payment-methods {
|
||||
--block-separator-gap: 28px;
|
||||
}
|
||||
|
||||
// It has no header; adjusts the gap to the control right above the tagline.
|
||||
&.tagline {
|
||||
--block-header-gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
/* The settings-panel (left side) */
|
||||
|
|
|
@ -2,6 +2,7 @@ import { __ } from '@wordpress/i18n';
|
|||
|
||||
import { StylingHooks } from '../../../../../../data';
|
||||
import { RadiobuttonStylingSection } from '../Layout';
|
||||
import { Tagline } from './index';
|
||||
|
||||
const SectionButtonLayout = ( { location } ) => {
|
||||
const { isAvailable, layout, setLayout, choices } =
|
||||
|
@ -12,13 +13,16 @@ const SectionButtonLayout = ( { location } ) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<RadiobuttonStylingSection
|
||||
className="button-layout"
|
||||
title={ __( 'Button Layout', 'woocommerce-paypal-payments' ) }
|
||||
options={ choices }
|
||||
selected={ layout }
|
||||
onChange={ setLayout }
|
||||
/>
|
||||
<>
|
||||
<RadiobuttonStylingSection
|
||||
className="button-layout"
|
||||
title={ __( 'Button Layout', 'woocommerce-paypal-payments' ) }
|
||||
options={ choices }
|
||||
selected={ layout }
|
||||
onChange={ setLayout }
|
||||
/>
|
||||
<Tagline location={ location } />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ const SectionTagline = ( { location } ) => {
|
|||
|
||||
return (
|
||||
<CheckboxStylingSection
|
||||
title={ __( 'Tagline', 'woocommerce-paypal-payments' ) }
|
||||
className="tagline"
|
||||
separatorAndGap={ false }
|
||||
options={ choices }
|
||||
value={ tagline }
|
||||
onChange={ setTagline }
|
||||
|
|
|
@ -6,7 +6,6 @@ import {
|
|||
ButtonShape,
|
||||
ButtonLabel,
|
||||
ButtonColor,
|
||||
Tagline,
|
||||
} from './Content';
|
||||
|
||||
const SettingsPanel = () => {
|
||||
|
@ -23,7 +22,6 @@ const SettingsPanel = () => {
|
|||
<ButtonShape location={ location } />
|
||||
<ButtonLabel location={ location } />
|
||||
<ButtonColor location={ location } />
|
||||
<Tagline location={ location } />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -156,7 +156,10 @@ export const useTaglineProps = ( location ) => {
|
|||
choices: [
|
||||
{
|
||||
value: 'tagline',
|
||||
label: __( 'Enable Tagline', 'woocommerce-paypal-payments' ),
|
||||
label: __(
|
||||
'Show tagline below buttons',
|
||||
'woocommerce-paypal-payments'
|
||||
),
|
||||
},
|
||||
],
|
||||
isAvailable:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue