mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +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,
|
children,
|
||||||
title,
|
title,
|
||||||
titleSuffix,
|
titleSuffix,
|
||||||
headerDescription,
|
|
||||||
description,
|
description,
|
||||||
horizontalLayout = false,
|
horizontalLayout = false,
|
||||||
separatorAndGap = true,
|
separatorAndGap = true,
|
||||||
|
@ -20,16 +19,13 @@ const SettingsBlock = ( {
|
||||||
<div className={ blockClassName }>
|
<div className={ blockClassName }>
|
||||||
<Header>
|
<Header>
|
||||||
<Title>
|
<Title>
|
||||||
{ title } <TitleExtra>{ titleSuffix }</TitleExtra>
|
{ title }
|
||||||
|
<TitleExtra>{ titleSuffix }</TitleExtra>
|
||||||
</Title>
|
</Title>
|
||||||
<Description>{ headerDescription }</Description>
|
<Description>{ description }</Description>
|
||||||
</Header>
|
</Header>
|
||||||
|
|
||||||
<Content asCard={ false }>
|
<Content asCard={ false }>{ children }</Content>
|
||||||
{ children }
|
|
||||||
|
|
||||||
<Description>{ description }</Description>
|
|
||||||
</Content>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
import { TextControl } from '@wordpress/components';
|
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 (
|
return (
|
||||||
<Action>
|
<Action>
|
||||||
<TextControl
|
<TextControl
|
||||||
|
@ -11,6 +16,7 @@ const ControlTextInput = ( { value, onChange, placeholder = '' } ) => {
|
||||||
value={ value }
|
value={ value }
|
||||||
onChange={ onChange }
|
onChange={ onChange }
|
||||||
/>
|
/>
|
||||||
|
<Description>{ description }</Description>
|
||||||
</Action>
|
</Action>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,7 +84,7 @@ const PaypalSettings = ( { updateFormValue, settings } ) => {
|
||||||
|
|
||||||
<SettingsBlock
|
<SettingsBlock
|
||||||
title={ __( 'Brand name', 'woocommerce-paypal-payments' ) }
|
title={ __( 'Brand name', 'woocommerce-paypal-payments' ) }
|
||||||
headerDescription={ __(
|
description={ __(
|
||||||
'What business name to show to your buyers during checkout and on receipts.',
|
'What business name to show to your buyers during checkout and on receipts.',
|
||||||
'woocommerce-paypal-payments'
|
'woocommerce-paypal-payments'
|
||||||
) }
|
) }
|
||||||
|
@ -101,7 +101,7 @@ const PaypalSettings = ( { updateFormValue, settings } ) => {
|
||||||
|
|
||||||
<SettingsBlock
|
<SettingsBlock
|
||||||
title={ __( 'Soft Descriptor', 'woocommerce-paypal-payments' ) }
|
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.",
|
"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'
|
'woocommerce-paypal-payments'
|
||||||
) }
|
) }
|
||||||
|
|
|
@ -9,11 +9,7 @@ const InvoicePrefix = () => {
|
||||||
return (
|
return (
|
||||||
<SettingsBlock
|
<SettingsBlock
|
||||||
title="Invoice Prefix"
|
title="Invoice Prefix"
|
||||||
supplementaryLabel={ __(
|
titleSuffix={ __( '(Recommended)', 'woocommerce-paypal-payments' ) }
|
||||||
'(Recommended)',
|
|
||||||
'woocommerce-paypal-payments'
|
|
||||||
) }
|
|
||||||
description="Add a unique prefix to invoice numbers for site-specific tracking (recommended)."
|
|
||||||
>
|
>
|
||||||
<ControlTextInput
|
<ControlTextInput
|
||||||
placeholder={ __(
|
placeholder={ __(
|
||||||
|
@ -22,6 +18,7 @@ const InvoicePrefix = () => {
|
||||||
) }
|
) }
|
||||||
onChange={ setInvoicePrefix }
|
onChange={ setInvoicePrefix }
|
||||||
value={ invoicePrefix }
|
value={ invoicePrefix }
|
||||||
|
description="Add a unique prefix to invoice numbers for site-specific tracking (recommended)."
|
||||||
/>
|
/>
|
||||||
</SettingsBlock>
|
</SettingsBlock>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue