Skip to content

pantoken / 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");