mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
37 lines
803 B
JavaScript
37 lines
803 B
JavaScript
import classNames from 'classnames';
|
|
import { Description, Header, Title, TitleExtra, Content } from './Elements';
|
|
|
|
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 }>
|
|
<Header>
|
|
<Title>
|
|
{ title } <TitleExtra>{ titleSuffix }</TitleExtra>
|
|
</Title>
|
|
<Description>{ headerDescription }</Description>
|
|
</Header>
|
|
|
|
<Content asCard={ false }>
|
|
{ children }
|
|
|
|
<Description>{ description }</Description>
|
|
</Content>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default SettingsBlock;
|