Skip to content

pantoken / renderers/react-markdown/src / InstuiMarkdown

函数: InstuiMarkdown()

InstuiMarkdown(props): ReactNode

Beta

使用 Instructure UI 元素映射以及 pantoken 图标/颜色 令牌渲染 Markdown。

参数

props

InstuiMarkdownProps

InstuiMarkdownProps.

返回值

ReactNode

示例

Basic

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

<InstuiMarkdown>{"Go :arrow-left: back. Brand is #03893D.\n\n> [!TIP]\n> Helpful."}</InstuiMarkdown>;

通过插件使用品牌图标

tsx
import { InstuiMarkdown } from "@pantoken/react-markdown";
import { simpleIcons } from "@pantoken/plugin-simple-icons";
import * as registry from "simple-icons";

<InstuiMarkdown renderOptions={{ icons: { plugins: [simpleIcons({ registry })] } }}>
  {"Star us on :github:"}
</InstuiMarkdown>;