woocommerce/plugins/woocommerce-blocks/bin/hook-docs/utilities/content-with-heading.js

8 lines
218 B
JavaScript

const contentWithHeading = ( content, heading, headingLevel = 'h3' ) => {
return content && content.length
? [ { [ headingLevel ]: heading }, { html: content } ]
: [];
};
module.exports = { contentWithHeading };