@mintlify/common
Version:
Commonly shared code within Mintlify
21 lines (20 loc) • 547 B
JavaScript
export const createCommentNode = (componentName) => {
const comment = ` Component ${componentName} does not exist. `;
return {
type: 'mdxFlowExpression',
value: `/* ${comment} */`,
data: {
estree: {
type: 'Program',
body: [],
comments: [
{
type: 'Block',
value: comment,
},
],
sourceType: 'module',
},
},
};
};