Skip to content

pantoken / plugins/pantoken/logos/src / getLogoDataUri

Funktio: getLogoDataUri()

getLogoDataUri(product, layout?, colorMode?, lang?): string | undefined

Beta

Hanki logo base64 data:image/svg+xml URI.

Parametrit

product

Product

Tuote.

layout?

LogoLayout = "horizontal"

Asettelu (oletus "horizontal").

colorMode?

LogoColorMode = "full-color"

Värikäsittely (oletus "full-color").

lang?

LogoLang

Paikallistetun wordmarkin kieli, jos halutaan käännetty versio.

Palauttaa

string | undefined

Data-URI tai undefined, jos kyseistä yhdistelmää ei ole.

Esimerkki

Käytä logoa <img> src:nä

ts
import { getLogoDataUri } from "@pantoken/plugin-logos";

const uri = getLogoDataUri("mastery", "icon", "color");
const img = document.createElement("img");
if (uri) img.src = uri;