woocommerce-paypal-payments/modules/ppcp-settings/resources/js/Components/ReusableComponents/Separator.js

27 lines
647 B
JavaScript
Raw Normal View History

2024-10-23 08:56:47 +02:00
const Separator = ( props ) => {
let separatorClass = 'ppcp-r-separator';
if ( props?.className ) {
separatorClass += ' ' + props.className;
}
if ( props.text ) {
return (
<div className={ separatorClass }>
<span className="ppcp-r-separator__line ppcp-r-separator__line--before"></span>
<span className="ppcp-r-separator__text">{ props.text }</span>
<span className="ppcp-r-separator__line ppcp-r-separator__line--after"></span>
</div>
);
}
return (
<div className={ separatorClass }>
<span className="ppcp-r-separator__line ppcp-r-separator__line--before"></span>
</div>
);
};
export default Separator;