Skip to content

pantoken / renderers/react-markdown/src / buildIconResolver

Функция: buildIconResolver()

buildIconResolver(options?): IconResolver

Бета

Постройте цепочку разрешения иконок: сначала резолверы плагина rehype, затем явные resolvers, затем встроенный набор @pantoken/icons. Побеждает первое совпадение.

Параметры

options?

InstuiMarkdownRenderOptions

Возвращаемое значение

IconResolver

Пример

ts
import { buildIconResolver } from "@pantoken/react-markdown";

const resolve = buildIconResolver();
resolve("arrow-left"); // an IconEntry from the built-in set, or undefined