@wordpress/block-library
Version:
Block library for the WordPress editor.
14 lines (10 loc) • 361 B
JavaScript
import { RawHTML } from '@wordpress/element';
export default function save( { attributes: { customText, noTeaser } } ) {
const moreTag = customText ? `<!--more ${ customText }-->` : '<!--more-->';
const noTeaserTag = noTeaser ? '<!--noteaser-->' : '';
return (
<RawHTML>
{ [ moreTag, noTeaserTag ].filter( Boolean ).join( '\n' ) }
</RawHTML>
);
}