Skip to content

pantoken-root / plugins/pantoken/logos/src / getLogoMeta

Feidhm: getLogoMeta() ​

getLogoMeta(product, layout?, colorMode?, lang?): LogoMeta | undefined

Béite

Faigh metaeolas loighóige, lena n-áirítear width/height PNG struchtúrtha — do thomhaltóirí a bhfuil gá acu chun cosán dist/<name>.png a thógáil (m.sh. trí dist/<name>.png) nó chun méid <img> a shocrú gan SVG a pharsáil.

Paraiméadair ​

product ​

Product

An táirge.

layout? ​

LogoLayout = "horizontal"

An leagan amach (réamhshocraithe "horizontal").

colorMode? ​

LogoColorMode = "full-color"

An chóiriú dathanna (réamhshocraithe "full-color").

lang? ​

LogoLang

Teanga an mharcfhocail áitiúil, má tá leagan aistrithe uait.

Tuairisceáin ​

LogoMeta | undefined

An sreang SVG, nó undefined má nach bhfuil an comhcheangal sin ann.

Sampla ​

Léigh cóimheas gné lógó

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

const meta = getLogoMeta("canvas", "horizontal", "color");
meta && meta.width / meta.height; // the logo's real aspect ratio