Skip to content

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

ฟังก์ชัน: createInstuiMarkdownComponents() ​

createInstuiMarkdownComponents(options?): Components

เบต้า

สร้างแมปคอมโพเนนต์ของ react-markdown สำหรับชุดตัวเลือกการเรนเดอร์

พารามิเตอร์ ​

options? ​

InstuiMarkdownRenderOptions = {}

InstuiMarkdownRenderOptions.

คืนค่า ​

Components

แมป components ของ react-markdown ที่สนับสนุนโดย 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>;