Skip to content

pantoken-root / renderers/react-markdown/src / createInstuiMarkdownComponents

Функція: createInstuiMarkdownComponents() ​

createInstuiMarkdownComponents(options?): Components

Бета

Побудувати карту компонентів react-markdown для набору параметрів рендерингу.

Параметри ​

options? ​

InstuiMarkdownRenderOptions = {}

InstuiMarkdownRenderOptions.

Повертає ​

Components

Карта react-markdown components, підтримувана Instructure UI.

Приклад ​

Передайте карту безпосередньо в react-markdown

tsx
import Markdown from "react-markdown";
import { createInstuiMarkdownComponents } from "@pantoken/react-markdown";

const components = createInstuiMarkdownComponents({ tableCaption: "Grades" });
<Markdown components={components}># Report</Markdown>;