Skip to content

pantoken / renderers/react-markdown/src / rehypeColorCodes

Fonksyon: rehypeColorCodes()

rehypeColorCodes(): (tree) => void

Beta

Yon plugin rehype ki anvlòp valè koulè endepandan yo nan <span data-color-code="…">, konsa React kouch la ka rann yon echantiyon koulè. Miroir pipeline icon-token la.

Retounen

(tree) => void

Egzanp

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

<Markdown rehypePlugins={[rehypeColorCodes]}>Brand is #03893D.</Markdown>;