mirror of
https://github.com/zenlm/zen-code-docs.git
synced 2026-10-30 14:58:40 +00:00
16 lines
468 B
TypeScript
16 lines
468 B
TypeScript
import { useMDXComponents as getDocsMDXComponents } from 'nextra-theme-docs'
|
|
import { Pre, withIcons } from 'nextra/components'
|
|
import { GitHubIcon } from 'nextra/icons'
|
|
import type { UseMDXComponents } from 'nextra/mdx-components'
|
|
|
|
const docsComponents = getDocsMDXComponents({
|
|
pre: withIcons(Pre, { js: GitHubIcon })
|
|
})
|
|
|
|
export const useMDXComponents: UseMDXComponents<typeof docsComponents> = <T>(
|
|
components?: T
|
|
) => ({
|
|
...docsComponents,
|
|
...components
|
|
})
|