Skip to content

pantoken / renderers/react-markdown/src / InstuiMarkdown

Fonction: InstuiMarkdown()

InstuiMarkdown(props): ReactNode

Bêta

Rendre le Markdown avec le mapping des éléments Instructure UI et les tokens d'icônes/couleurs de pantoken.

Paramètres

props

InstuiMarkdownProps

InstuiMarkdownProps.

Renvoie

ReactNode

Exemples

Basic

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

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

Avec des icônes de marque via un 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>;