mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
✨ Opt-out for the card-layout in Content component
This commit is contained in:
parent
4da27fdb05
commit
b6720146eb
3 changed files with 16 additions and 11 deletions
|
@ -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 }>
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue