Opt-out for the card-layout in Content component

This commit is contained in:
Philipp Stracker 2025-01-22 15:11:24 +01:00
parent 4da27fdb05
commit b6720146eb
No known key found for this signature in database
3 changed files with 16 additions and 11 deletions

View file

@ -1,10 +1,9 @@
import classNames from 'classnames';
const Content = ( { children, className = '', id = '' } ) => {
const elementClasses = classNames(
'ppcp-r-settings-card__content',
className
);
const Content = ( { children, asCard = true, className = '', id = '' } ) => {
const elementClasses = classNames( 'ppcp-r-settings-content', className, {
'ppcp--is-card': asCard,
} );
return (
<div id={ id } className={ elementClasses }>

View file

@ -26,7 +26,9 @@ const StylingSection = ( {
<Description>{ description }</Description>
</Header>
<Content className="section-content">{ children }</Content>
<Content asCard={ false } className="section-content">
{ children }
</Content>
</SettingsBlock>
);
};