mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +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 { 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, {
|
||||
'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;
|
||||
|
|
|
@ -8,7 +8,7 @@ const ButtonSettingsBlock = ( { title, description, ...props } ) => (
|
|||
title={ title }
|
||||
headerDescription={ description }
|
||||
horizontalLayout={ true }
|
||||
className="ppcp-r-settings-block__button"
|
||||
className="ppcp--button-block"
|
||||
{ ...props }
|
||||
>
|
||||
<Action>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue