Skip to content

pantoken-root / platforms/email/src / emailTokens

関数: emailTokens() ​

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

実験的

モードのトークンマップを選択します(デフォルト "light")。

パラメーター ​

mode? ​

Mode = "light"

戻り値 ​

Record<string, string>

例 ​

メールセルにトークンをインライン挿入する(ライトモード)

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

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

ダークモード

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

const t = emailTokens("dark");