Skip to content

pantoken / platforms/email/src / emailTokens

Fonksiyon: emailTokens()

emailTokens(mode?): Record<string, string>

Deneysel

Bir mod için token haritasını seçin (varsayılan "light").

Parametreler

mode?

Mode = "light"

Döndürür

Record<string, string>

Örnekler

Bir tokeni e-posta hücresine satır içi olarak yerleştirin (aydınlık mod)

ts
import { emailTokens } from "@pantoken/email";

const t = emailTokens();
const html = `<td style="background:${t.colorBackgroundBrand};color:${t.colorTextOnColor}">Hi</td>`;

Karanlık mod

ts
import { emailTokens } from "@pantoken/email";

const t = emailTokens("dark");