Skip to content

pantoken-root / plugins/pantoken/logos/src / getLogoSvg

Funktion: getLogoSvg() ​

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

Beta

Rohes SVG eines Logos abrufen.

Parameter ​

product ​

Product

Das Produkt.

layout? ​

LogoLayout = "horizontal"

Das Layout (Standard: "horizontal").

colorMode? ​

LogoColorMode = "full-color"

Die Farbgestaltung (Standard: "full-color").

lang? ​

LogoLang

Die Sprache der lokalisierten Wortmarke, falls eine übersetzte Variante gewünscht ist.

Rückgabe ​

string | undefined

Der SVG-String, oder undefined, falls diese Kombination nicht existiert.

Beispiele ​

Das standardmäßige horizontale Canvas-Logo in Vollfarbe abrufen

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

const svg = getLogoSvg("canvas");

Ein bestimmtes Layout und eine Farbgestaltung auswählen

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

const reversed = getLogoSvg("instructure", "stacked", "reversed");