mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
🚧 Fix CSS class of ButtonSettingsBlock
This commit is contained in:
parent
d8ecb019de
commit
2f79a9fe4d
2 changed files with 29 additions and 3 deletions
|
@ -1,11 +1,37 @@
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
import { Description, Header, Title, TitleExtra, Content } from './Elements';
|
||||||
|
|
||||||
const SettingsBlock = ( { className, children, separatorAndGap = true } ) => {
|
const SettingsBlock = ( {
|
||||||
|
className,
|
||||||
|
children,
|
||||||
|
title,
|
||||||
|
titleSuffix,
|
||||||
|
headerDescription,
|
||||||
|
description,
|
||||||
|
horizontalLayout = false,
|
||||||
|
separatorAndGap = true,
|
||||||
|
} ) => {
|
||||||
const blockClassName = classNames( 'ppcp-r-settings-block', className, {
|
const blockClassName = classNames( 'ppcp-r-settings-block', className, {
|
||||||
'ppcp--no-gap': ! separatorAndGap,
|
'ppcp--no-gap': ! separatorAndGap,
|
||||||
|
'ppcp--horizontal': horizontalLayout,
|
||||||
} );
|
} );
|
||||||
|
|
||||||
return <div className={ blockClassName }>{ children }</div>;
|
return (
|
||||||
|
<div className={ blockClassName }>
|
||||||
|
<Header>
|
||||||
|
<Title>
|
||||||
|
{ title } <TitleExtra>{ titleSuffix }</TitleExtra>
|
||||||
|
</Title>
|
||||||
|
<Description>{ headerDescription }</Description>
|
||||||
|
</Header>
|
||||||
|
|
||||||
|
<Content asCard={ false }>
|
||||||
|
{ children }
|
||||||
|
|
||||||
|
<Description>{ description }</Description>
|
||||||
|
</Content>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SettingsBlock;
|
export default SettingsBlock;
|
||||||
|
|
|
@ -8,7 +8,7 @@ const ButtonSettingsBlock = ( { title, description, ...props } ) => (
|
||||||
title={ title }
|
title={ title }
|
||||||
headerDescription={ description }
|
headerDescription={ description }
|
||||||
horizontalLayout={ true }
|
horizontalLayout={ true }
|
||||||
className="ppcp-r-settings-block__button"
|
className="ppcp--button-block"
|
||||||
{ ...props }
|
{ ...props }
|
||||||
>
|
>
|
||||||
<Action>
|
<Action>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue