import data from '../../utils/data'; import TitleBadge, {TITLE_BADGE_INFO} from "./TitleBadge"; import {__} from "@wordpress/i18n"; const BadgeBox = ( props ) => { const titleSize = props.titleType && props.titleType === BADGE_BOX_TITLE_BIG ? BADGE_BOX_TITLE_BIG : BADGE_BOX_TITLE_SMALL const titleTextClassName = 'ppcp-r-badge-box__title-text ' + `ppcp-r-badge-box__title-text--${titleSize}`; const titleBaseClassName = 'ppcp-r-badge-box__title'; const titleClassName = props.imageBadge ? `${titleBaseClassName} ppcp-r-badge-box__title--has-image-badge` : titleBaseClassName; return (
{props.title} {props.imageBadge && ( {props.imageBadge.map((badge) => data().getImage(badge))} )} {props.textBadge && ( )}
{props?.description && (

)}
); }; export const BADGE_BOX_TITLE_BIG = 'big'; export const BADGE_BOX_TITLE_SMALL = 'small'; export default BadgeBox;