Skip to content

pantoken-root / packages/core/src / decodeIconSvg

Fonksiyon: decodeIconSvg() ​

decodeIconSvg(value): string

Beta

Bir simge token'ının url('data:…') değerini inline SVG'ye geri çözümle.

Parametreler ​

value ​

string

Döndürür ​

string

Örnek ​

ts
import { decodeIconSvg } from "@pantoken/core";

const svg = "<svg viewBox='0 0 24 24'><path d='M1 1'/></svg>";
const value = `url('data:image/svg+xml;utf8,${encodeURIComponent(svg)}')`;
decodeIconSvg(value); // → "<svg viewBox='0 0 24 24'><path d='M1 1'/></svg>"