Add generic option to suppress separator lines

This commit is contained in:
Philipp Stracker 2025-01-10 18:29:54 +01:00
parent 25887024a6
commit 406e8ebc98
No known key found for this signature in database
2 changed files with 5 additions and 3 deletions

View file

@ -88,7 +88,7 @@
margin-left: 5px;
}
+ .ppcp-r-settings-block {
+ .ppcp-r-settings-block:not(.no-gap) {
margin-top: 32px;
padding-top: 32px;
border-top: 1px solid var(--color-gray-200);

View file

@ -1,7 +1,9 @@
import classNames from 'classnames';
const SettingsBlock = ( { className, children } ) => {
const blockClassName = classNames( 'ppcp-r-settings-block', className );
const SettingsBlock = ( { className, children, separatorAndGap = true } ) => {
const blockClassName = classNames( 'ppcp-r-settings-block', className, {
'no-gap': ! separatorAndGap,
} );
return <div className={ blockClassName }>{ children }</div>;
};