Skip to content

pantoken-root / platforms/email/src / emailTokens

Funkcja: emailTokens() ​

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

Eksperymentalne

Wybierz mapę tokenów dla trybu (domyślnie "light").

Parametry ​

mode? ​

Mode = "light"

Zwraca ​

Record<string, string>

Przykłady ​

Wstaw token bezpośrednio do komórki e-mail (tryb jasny)

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

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

Tryb ciemny

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

const t = emailTokens("dark");