Skip to content

pantoken-root / renderers/vue/src / iconSvg

Fonction: iconSvg() ​

iconSvg(name, resolve?): string

Expérimental

Résout un nom d'icône en SVG en ligne (chaîne vide si inconnu). Pur — l'élément l'affiche.

Paramètres ​

name ​

string

Le nom de l'icône (par ex. arrow-left).

resolve? ​

IconResolver

Le résolveur (par défaut, l'ensemble d'icônes pantoken intégré).

Renvoie ​

string

Exemple ​

ts
import { iconSvg } from "@pantoken/web-components";

const svg = iconSvg("arrow-left"); // "<svg …>…</svg>", or "" when unknown