Are you an LLM? You can read better optimized documentation at /hu/api/plugins/pantoken/simple-icons/src/functions/simpleIcons.md for this page in Markdown format
pantoken / plugins/pantoken/simple-icons/src / simpleIcons
Függvény: simpleIcons()
simpleIcons(
options?):PantokenPlugin
Béta
A Simple Icons bővítmény létrehozása.
Paraméterek
options?
SimpleIconsOptions = {}
SimpleIconsOptions. Adjon át egy registry-et, hogy elkerülje a lusta importálást (például token-stage használatban, ahol a horogok szinkronok).
Visszatérés
Egy PantokenPlugin tokens és rehype horogokkal.
Példák
Márka szimbólumok kibocsátása <image> tokenként
ts
import { buildTokens } from "@pantoken/core";
import { simpleIcons } from "@pantoken/plugin-simple-icons";
import * as registry from "simple-icons";
buildTokens({
theme: "rebrand",
plugins: [simpleIcons({ registry, slugs: ["github", "react"] })],
});
// adds --instui-icon-github, --instui-icon-react as <image> tokens:brand: kódok feloldása rendereléskor (rehype réteg)
ts
import { simpleIcons } from "@pantoken/plugin-simple-icons";
import * as registry from "simple-icons";
const { resolve } = simpleIcons({ registry }).rehype!({ resolve: () => undefined });
resolve("github"); // { name, path, svg, viewBox, source: "simple-icons" }