mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
♻️ Remove description-location-logic
This commit is contained in:
parent
f90ab656f5
commit
7a71ff3657
4 changed files with 16 additions and 17 deletions
|
@ -6,7 +6,6 @@ const SettingsBlock = ( {
|
|||
children,
|
||||
title,
|
||||
titleSuffix,
|
||||
headerDescription,
|
||||
description,
|
||||
horizontalLayout = false,
|
||||
separatorAndGap = true,
|
||||
|
@ -20,16 +19,13 @@ const SettingsBlock = ( {
|
|||
<div className={ blockClassName }>
|
||||
<Header>
|
||||
<Title>
|
||||
{ title } <TitleExtra>{ titleSuffix }</TitleExtra>
|
||||
{ title }
|
||||
<TitleExtra>{ titleSuffix }</TitleExtra>
|
||||
</Title>
|
||||
<Description>{ headerDescription }</Description>
|
||||
<Description>{ description }</Description>
|
||||
</Header>
|
||||
|
||||
<Content asCard={ false }>
|
||||
{ children }
|
||||
|
||||
<Description>{ description }</Description>
|
||||
</Content>
|
||||
<Content asCard={ false }>{ children }</Content>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
import { TextControl } from '@wordpress/components';
|
||||
|
||||
import { Action } from '../Elements';
|
||||
import { Action, Description } from '../Elements';
|
||||
|
||||
const ControlTextInput = ( { value, onChange, placeholder = '' } ) => {
|
||||
const ControlTextInput = ( {
|
||||
value,
|
||||
description,
|
||||
onChange,
|
||||
placeholder = '',
|
||||
} ) => {
|
||||
return (
|
||||
<Action>
|
||||
<TextControl
|
||||
|
@ -11,6 +16,7 @@ const ControlTextInput = ( { value, onChange, placeholder = '' } ) => {
|
|||
value={ value }
|
||||
onChange={ onChange }
|
||||
/>
|
||||
<Description>{ description }</Description>
|
||||
</Action>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -84,7 +84,7 @@ const PaypalSettings = ( { updateFormValue, settings } ) => {
|
|||
|
||||
<SettingsBlock
|
||||
title={ __( 'Brand name', 'woocommerce-paypal-payments' ) }
|
||||
headerDescription={ __(
|
||||
description={ __(
|
||||
'What business name to show to your buyers during checkout and on receipts.',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
|
@ -101,7 +101,7 @@ const PaypalSettings = ( { updateFormValue, settings } ) => {
|
|||
|
||||
<SettingsBlock
|
||||
title={ __( 'Soft Descriptor', 'woocommerce-paypal-payments' ) }
|
||||
headerDescription={ __(
|
||||
description={ __(
|
||||
"The dynamic text used to construct the statement descriptor that appears on a payer's card statement. Applies to PayPal and Credit Card transactions. Max value of 22 characters.",
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
|
|
|
@ -9,11 +9,7 @@ const InvoicePrefix = () => {
|
|||
return (
|
||||
<SettingsBlock
|
||||
title="Invoice Prefix"
|
||||
supplementaryLabel={ __(
|
||||
'(Recommended)',
|
||||
'woocommerce-paypal-payments'
|
||||
) }
|
||||
description="Add a unique prefix to invoice numbers for site-specific tracking (recommended)."
|
||||
titleSuffix={ __( '(Recommended)', 'woocommerce-paypal-payments' ) }
|
||||
>
|
||||
<ControlTextInput
|
||||
placeholder={ __(
|
||||
|
@ -22,6 +18,7 @@ const InvoicePrefix = () => {
|
|||
) }
|
||||
onChange={ setInvoicePrefix }
|
||||
value={ invoicePrefix }
|
||||
description="Add a unique prefix to invoice numbers for site-specific tracking (recommended)."
|
||||
/>
|
||||
</SettingsBlock>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue