mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
🚚 Rename component to TitleExtra
This commit is contained in:
parent
1ca6641d77
commit
4da27fdb05
4 changed files with 16 additions and 14 deletions
|
@ -1,7 +0,0 @@
|
|||
const SupplementaryLabel = ( { children } ) => (
|
||||
<span className="ppcp-r-settings-block__supplementary-title-label">
|
||||
{ children }
|
||||
</span>
|
||||
);
|
||||
|
||||
export default SupplementaryLabel;
|
|
@ -0,0 +1,13 @@
|
|||
const TitleExtra = ( { children } ) => {
|
||||
if ( ! children ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<span className="ppcp-r-settings-block__supplementary-title-label">
|
||||
{ children }
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
export default TitleExtra;
|
|
@ -7,7 +7,7 @@ export { default as Content } from './Content';
|
|||
export { default as ContentWrapper } from './ContentWrapper';
|
||||
export { default as Description } from './Description';
|
||||
export { default as Header } from './Header';
|
||||
export { default as SupplementaryLabel } from './SupplementaryLabel';
|
||||
export { default as Title } from './Title';
|
||||
export { default as TitleExtra } from './TitleExtra';
|
||||
export { default as TitleWrapper } from './TitleWrapper';
|
||||
export { default as Separator } from './Separator';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { TextControl } from '@wordpress/components';
|
||||
|
||||
import SettingsBlock from '../SettingsBlock';
|
||||
import { Title, Action, Description, SupplementaryLabel } from '../Elements';
|
||||
import { Title, Action, Description, TitleExtra } from '../Elements';
|
||||
|
||||
const InputSettingsBlock = ( {
|
||||
title,
|
||||
|
@ -18,11 +18,7 @@ const InputSettingsBlock = ( {
|
|||
<SettingsBlock className="ppcp-r-settings-block__input">
|
||||
<Title>
|
||||
{ title }
|
||||
{ supplementaryLabel && (
|
||||
<SupplementaryLabel>
|
||||
{ supplementaryLabel }
|
||||
</SupplementaryLabel>
|
||||
) }
|
||||
<TitleExtra>{ supplementaryLabel }</TitleExtra>
|
||||
</Title>
|
||||
{ showDescriptionFirst && TheDescription }
|
||||
<Action>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue