import { LearnMore } from './Elements'; import { PPIcon } from './Icons'; const ImageBadge = ( { images } ) => { if ( ! images || ! images.length ) { return null; } return ( { images.map( ( badge, index ) => ( ) ) } ); }; // If `children` is not empty, the `children` prop is output and wrapped in spaces. const BadgeContent = ( { children } ) => { if ( ! children ) { return null; } return <> { children } ; }; const BadgeDescription = ( { description, learnMoreLink } ) => { if ( ! description && ! learnMoreLink ) { return null; } return (

{ description }

); }; const BadgeBox = ( { title, textBadge, imageBadge = [], description = '', learnMoreLink = '', } ) => { const titleTextClassName = 'ppcp-r-badge-box__title-text'; const titleBaseClassName = 'ppcp-r-badge-box__title'; const titleClassName = imageBadge.length ? `${ titleBaseClassName } ppcp-r-badge-box__title--has-image-badge` : titleBaseClassName; return (
{ title } { textBadge }
); }; export default BadgeBox;