Skip to content

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

फंक्शन: iconSvg() ​

iconSvg(name, resolve?): string

अल्फा

एक आइकन नाम को इनलाइन 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