Hide empty option-selector title element

This commit is contained in:
Philipp Stracker 2025-02-07 19:26:57 +01:00
parent 618b687428
commit 6b239b261a
No known key found for this signature in database

View file

@ -50,6 +50,7 @@ const OptionItem = ( {
const boxClassName = classNames( 'ppcp-r-select-box', {
'ppcp--selected': isSelected,
'ppcp--multiselect': isMulti,
'ppcp--no-title': ! itemTitle,
} );
return (
@ -64,7 +65,9 @@ const OptionItem = ( {
<div className="ppcp--box-content">
<div className="ppcp--box-content-inner">
<span className="ppcp--box-title">{ itemTitle }</span>
{ itemTitle && (
<span className="ppcp--box-title">{ itemTitle }</span>
) }
<div className="ppcp--box-description">
{ itemDescription }
</div>