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>;