Skip to content

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

函数: getLogoSvg() ​

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

Beta

获取徽标的原始 SVG。

参数 ​

product ​

Product

产品。

layout? ​

LogoLayout = "horizontal"

布局(默认 "horizontal")。

colorMode? ​

LogoColorMode = "full-color"

配色(默认 "full-color")。

lang? ​

LogoLang

本地化字标的语言(如需翻译版本)。

返回值 ​

string | undefined

SVG 字符串;如果该组合不存在,则为 undefined。

示例 ​

获取默认的横向全彩 Canvas 徽标

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

const svg = getLogoSvg("canvas");

选择特定的布局和配色处理

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

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