Skip to content

pantoken / renderers/react-markdown/src / InstuiMarkdown

Funzione: InstuiMarkdown()

InstuiMarkdown(props): ReactNode

Beta

Eseguire il rendering del Markdown con le mappature degli elementi di Instructure UI e i token di icone/colori di pantoken.

Parametri

props

InstuiMarkdownProps

InstuiMarkdownProps.

Restituisce

ReactNode

Esempi

Basic

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

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

Con icone del brand tramite 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>;