Skip to content

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

Fonksyon: getLogoMeta() ​

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

Beta

Jwenn metadata yon logo, enkli width/height PNG rasterize a — pou konsomatè ki bezwen konstwi yon chemen dist/<name>.png (pa egzanp atravè @pantoken/cdn)) oswa bay yon <img> yon gwosè san yo pa analize SVG.

Paramèt ​

product ​

Product

Pwodwi a.

layout? ​

LogoLayout = "horizontal"

Aranjman an (pa defo "horizontal").

colorMode? ​

LogoColorMode = "full-color"

Tretman koulè a (pa defo "full-color").

lang? ​

LogoLang

Lang wordmark lokalize a, si yo vle yon varyant tradui.

Retounen ​

LogoMeta | undefined

Chèn SVG la, oswa undefined si konbinezon sa a pa egziste.

Egzanp ​

Read a logo's aspect ratio

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

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