Skip to content

pantoken / renderers/react-markdown/src / InstuiMarkdown

تابع: InstuiMarkdown()

InstuiMarkdown(props): ReactNode

بتا

نمایش Markdown با نگاشت المان‌های Instructure UI و توکن‌های آیکون/رنگ pantoken.

پارامترها

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