Files
woonoow-docs/lib/mdx-components.ts
2026-05-30 18:52:21 +07:00

68 lines
1.2 KiB
TypeScript

import {
createMdxComponents,
type MdxComponentMap,
AccordionsMdx,
AccordionMdx,
CardsMdx,
ChangesMdx,
CodeBlock,
FileMdx,
FilesMdx,
FolderMdx,
KbdMdx,
NoteMdx,
ReleaseMdx,
StepsMdx,
StepMdx,
TabMdx,
TabsMdx,
TableBodyMdx,
TableCellMdx,
TableFooterMdx,
TableHeadMdx,
TableHeaderMdx,
TableMdx,
TableRowMdx,
TooltipMdx,
YoutubeMdx,
} from "@docubook/mdx-content";
import { ImageMdx, LinkMdx, ButtonMdx, CardMdx } from "@docubook/mdx-content/next";
import { customMdxComponents } from "@/lib/mdx";
const builtInOverrides: MdxComponentMap = {
Tabs: TabsMdx,
Tab: TabMdx,
table: TableMdx,
thead: TableHeaderMdx,
tbody: TableBodyMdx,
tfoot: TableFooterMdx,
tr: TableRowMdx,
th: TableHeadMdx,
td: TableCellMdx,
pre: CodeBlock,
Button: ButtonMdx,
Note: NoteMdx,
Step: StepMdx,
Steps: StepsMdx,
Accordion: AccordionMdx,
Accordions: AccordionsMdx,
Card: CardMdx,
Cards: CardsMdx,
Kbd: KbdMdx,
Release: ReleaseMdx,
Changes: ChangesMdx,
File: FileMdx,
Files: FilesMdx,
Folder: FolderMdx,
Youtube: YoutubeMdx,
Tooltip: TooltipMdx,
img: ImageMdx,
a: LinkMdx,
Link: LinkMdx,
};
export const mdxComponents = createMdxComponents({
...builtInOverrides,
...customMdxComponents,
});