Skip to content

pantoken / renderers/react-markdown/src / InstuiMarkdown

Συνάρτηση: InstuiMarkdown()

InstuiMarkdown(props): ReactNode

Βήτα

Απόδοση Markdown με αντιστοιχίσεις στοιχείων του Instructure UI και tokens εικονιδίων/χρωμάτων του 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>;

Με εικονίδια της μάρκας μέσω plugin

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