Skip to content

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

פונקציה: getLogoMeta() ​

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

בטא

קבל מטא־נתונים של לוגו, כולל ה-width/height של PNG המעובד — עבור צרכנים שצריכים לבנות נתיב dist/<name>.png (למשל דרך @pantoken/cdn) או לגדר גודל של <img> בלי לנתח SVG.

פרמטרים ​

product ​

Product

המוצר.

layout? ​

LogoLayout = "horizontal"

הפריסה (ברירת מחדל "horizontal").

colorMode? ​

LogoColorMode = "full-color"

עיבוד הצבעים (ברירת מחדל "full-color").

lang? ​

LogoLang

שפת הסימן המילולי המקומי, אם נדרשת גרסה מתורגמת.

מחזיר ​

LogoMeta | undefined

מחרוזת ה‑SVG, או undefined אם השילוב הזה לא קיים.

דוגמה ​

קראו את יחס ההיבט של לוגו

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

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