Skip to content

pantoken / plugins/pantoken/logos/src / getLogoDataUri

Mahi: getLogoDataUri()

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

Beta

Tikiake tētahi logo hei URI base64 data:image/svg+xml.

Ngā Tawhā

product

Product

Te hua.

layout?

LogoLayout = "horizontal"

Te whakatakotoranga (taunoa "horizontal").

colorMode?

LogoColorMode = "full-color"

Te maimoatanga tae (taunoa "full-color").

lang?

LogoLang

Te reo o te kupu tohu ā-rohe, mēnā e hiahiatia ana tētahi waahanga kua whakamaoritia.

Whakahokia

string | undefined

Te URI raraunga, rānei undefined mēnā kāore taua huinga e wātea.

Tauira

Whakamahia tētahi logo hei <img> src

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

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