const CardSection = ({ title, children, wrappable, borderless }) => { const className = classNames({ 'next-card__section': true, 'wrappable': wrappable, 'wrappable--half-spacing': wrappable, 'next-card__section--no-border': borderless, 'next-card__section--no-top-spacing': borderless }); const showTitle = () => { if (title) { return ; } else { return null; } }; return (
{showTitle()} {children}
); }; CardSection.propTypes = { title: React.PropTypes.string, children: React.PropTypes.node };