💄 Improvement UX for the “tagline” option

This commit is contained in:
Philipp Stracker 2025-01-17 13:27:31 +01:00
parent 0428dd08aa
commit 00c00bf9b1
No known key found for this signature in database
5 changed files with 21 additions and 11 deletions

View file

@ -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) */

View file

@ -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 } />
</>
);
};

View file

@ -13,8 +13,8 @@ const SectionTagline = ( { location } ) => {
return (
<CheckboxStylingSection
title={ __( 'Tagline', 'woocommerce-paypal-payments' ) }
className="tagline"
separatorAndGap={ false }
options={ choices }
value={ tagline }
onChange={ setTagline }

View file

@ -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>
);
};

View file

@ -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: