Skip to content

pantoken-root / renderers/web-components/src / iconSvg

Ֆունկցիա: iconSvg() ​

iconSvg(name, resolve?): string

Ալֆա

Պատկերանիշի անունը վերափոխում է inline SVG-ի (դատարկ տող՝ երբ անհայտ է). «Pure» — էլեմենտը այն արտապատկերում է։

Պարամետրեր ​

name ​

string

Պատկերանիշի անունը (օր. arrow-left).

resolve? ​

IconResolver = pantokenResolve

Վերացուցիչը (ստանդարտորեն օգտագործում է ներշնչված pantoken պատկերանիշների հավաքածուն).

Վերադարձվող արժեք ​

string

Օրինակ ​

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

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