UNPKG

@newrelic/gatsby-theme-newrelic

Version:

[![Community Project header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Project.png)](https://opensource.newrelic.com/oss-category/#community-project)

15 lines (14 loc) 367 B
export const isMdxType = (child, type, { nestedWithin } = {}) => { if (nestedWithin) { if ( child?.props?.mdxType === nestedWithin && Array.isArray(child.props.children) ) { return child.props.children.some( (child) => child?.props?.mdxType === type ); } return false; } return child?.props?.mdxType === type; };