@fullstackdatasolutions/articles 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -41,6 +41,7 @@ export type {
41
41
  CategoryDescription,
42
42
  CommentsConfig,
43
43
  LinkTargetStrategy,
44
+ MdxComponents,
44
45
  BreadcrumbsConfig,
45
46
  BreadcrumbLabels,
46
47
  ArticleBreadcrumbToken,
package/src/renderMdx.tsx CHANGED
@@ -45,6 +45,10 @@ export async function renderMdxSource(source: string, basePath?: string, config?
45
45
  })
46
46
 
47
47
  const Content = mdxModule.default as MdxContent
48
- const components = basePath ? { img: makeImgComponent(basePath) } : undefined
48
+ const internalComponents = basePath ? { img: makeImgComponent(basePath) } : undefined
49
+ const components =
50
+ internalComponents || config?.mdxComponents
51
+ ? { ...internalComponents, ...config?.mdxComponents }
52
+ : undefined
49
53
  return <Content components={components as Record<string, ComponentType<unknown>>} />
50
54
  }