6 lines
186 B
JavaScript
6 lines
186 B
JavaScript
|
const sectionWithHeading = ( content, heading, headingLevel = 'h3' ) => {
|
||
|
return content ? [ { [ headingLevel ]: heading }, content ] : [];
|
||
|
};
|
||
|
|
||
|
module.exports = { sectionWithHeading };
|