2025-01-10 18:20:00 +01:00
|
|
|
import classNames from 'classnames';
|
2025-01-22 15:30:49 +01:00
|
|
|
import { Description, Header, Title, TitleExtra, Content } from './Elements';
|
2025-01-10 18:20:00 +01:00
|
|
|
|
2025-01-22 15:30:49 +01:00
|
|
|
const SettingsBlock = ( {
|
|
|
|
className,
|
|
|
|
children,
|
|
|
|
title,
|
|
|
|
titleSuffix,
|
|
|
|
headerDescription,
|
|
|
|
description,
|
|
|
|
horizontalLayout = false,
|
|
|
|
separatorAndGap = true,
|
|
|
|
} ) => {
|
2025-01-10 18:29:54 +01:00
|
|
|
const blockClassName = classNames( 'ppcp-r-settings-block', className, {
|
2025-01-22 15:08:14 +01:00
|
|
|
'ppcp--no-gap': ! separatorAndGap,
|
2025-01-22 15:30:49 +01:00
|
|
|
'ppcp--horizontal': horizontalLayout,
|
2025-01-10 18:29:54 +01:00
|
|
|
} );
|
2024-12-08 09:33:49 +01:00
|
|
|
|
2025-01-22 15:30:49 +01:00
|
|
|
return (
|
|
|
|
<div className={ blockClassName }>
|
|
|
|
<Header>
|
|
|
|
<Title>
|
|
|
|
{ title } <TitleExtra>{ titleSuffix }</TitleExtra>
|
|
|
|
</Title>
|
|
|
|
<Description>{ headerDescription }</Description>
|
|
|
|
</Header>
|
|
|
|
|
|
|
|
<Content asCard={ false }>
|
|
|
|
{ children }
|
|
|
|
|
|
|
|
<Description>{ description }</Description>
|
|
|
|
</Content>
|
|
|
|
</div>
|
|
|
|
);
|
2024-12-08 09:33:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export default SettingsBlock;
|