import classNames from 'classnames'; import { Content, ContentWrapper } from './SettingsBlocks'; const SettingsCard = ( { id, className: extraClassName, title, description, children, contentItems, contentContainer = true, } ) => { const className = classNames( 'ppcp-r-settings-card', extraClassName ); const renderContent = () => { // If contentItems array is provided, wrap each item in Content component if ( contentItems ) { return ( { contentItems.map( ( item ) => ( { item } ) ) } ); } // Otherwise handle regular children with contentContainer prop if ( contentContainer ) { return { children }; } return children; }; return (
{ title }

{ description }

{ renderContent() }
); }; export default SettingsCard;